(TreeNode root)
| 6 | public class QuestionBrute { |
| 7 | |
| 8 | public static int getHeight(TreeNode root) { |
| 9 | if (root == null) { |
| 10 | return 0; |
| 11 | } |
| 12 | return Math.max(getHeight(root.left), getHeight(root.right)) + 1; |
| 13 | } |
| 14 | |
| 15 | public static boolean isBalanced(TreeNode root) { |
| 16 | if (root == null) { |