(String[] args)
| 34 | } |
| 35 | |
| 36 | public static void main(String[] args) { |
| 37 | // Create balanced tree |
| 38 | int[] array = {0, 1, 2, 3, 5, 6, 7, 8, 9, 10}; |
| 39 | TreeNode root = TreeNode.createMinimalBST(array); |
| 40 | |
| 41 | |
| 42 | System.out.println("Is balanced? " + isBalanced(root)); |
| 43 | |
| 44 | root.insertInOrder(4); // Add 4 to make it unbalanced |
| 45 | |
| 46 | System.out.println("Is balanced? " + isBalanced(root)); |
| 47 | } |
| 48 | |
| 49 | } |
nothing calls this directly
no test coverage detected