///////////////////////// Test ////////////////////////// public static void test(RotateImage r, int[][] m) { System.out.println("-------- Before ---------"); ListPrinter.print2DArray(m); System.out.println("-------- After ---------"); r.rotate(m); ListPrinter.print2DArray(m); System.out.println(); }
//////////////////////// TEST //////////////////////// private static void test(BinaryTreeLevelOrderTraversal solution, String[] s) { TreeNode root = TreeNode.buildTree(s); List<List<Integer>> result = solution.levelOrder(root); ListPrinter.print2DList(result); System.out.println(); }