@@ -0,0 +1,767 @@
+/**%0A * Definition for a binary tree node.%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    private boolean balanced = true;%0A    public boolean isBalanced(TreeNode root) %7B%0A        findDepth(root, 1);%0A        return balanced;%0A    %7D%0A    %0A    private int findDepth (TreeNode node, int level)%7B%0A        if(!balanced %7C%7C node == null)%7B%0A            return level - 1;%0A        %7D%0A        int depthL = findDepth(node.left, level+1);%0A        int depthR = findDepth(node.right, level+1);%0A        int max = Math.max(depthL, depthR);%0A        int min = Math.min(depthL, depthR);%0A        if(max - min %3E 1)%7B%0A            balanced = false;%0A        %7D%0A        return max;%0A    %7D%0A%7D

Balanced Binary Tree