@@ -0,0 +1,837 @@
+/***%0A * Given a binary tree, determine if it is height-balanced.%0A *%0A * For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1.%0A */%0A/**%0A * Definition for binary tree%0A * public class TreeNode %7B%0A *     int val;%0A *     TreeNode left;%0A *     TreeNode right;%0A *     TreeNode(int x) %7B val = x; %7D%0A * %7D%0A */%0Apublic class Solution %7B%0A    public boolean isBalanced(TreeNode root) %7B%0A        return treeBalance(root) %3E= 0;%0A    %7D%0A%0A    private int treeBalance(TreeNode root) %7B%0A        if (root == null)%0A            return 0;%0A        int left = treeBalance(root.left);%0A        int right = treeBalance(root.right);%0A%0A        if (left %3C 0 %7C%7C right %3C 0 %7C%7C Math.abs(left - right) %3E 1)%0A            return -1;%0A        return Math.max(left, right) + 1;%0A    %7D%0A%7D%0A

add BalancedBinaryTree.java