@@ -0,0 +1,739 @@
+/**%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    public int findTilt(TreeNode root) %7B%0A        if(root== null %7C%7C root.left == null && root.right == null)%7B%0A            return 0;%0A        %7D%0A        int%5B%5D res=new int%5B1%5D;%0A        postorder(root, res);%0A        return res%5B0%5D;%0A        %0A    %7D%0A    %0A    private int postorder(TreeNode root, int%5B%5D res)%7B%0A        if(root == null)%7B%0A          return 0; %0A        %7D %0A        int left = postorder(root.left, res);%0A        int right = postorder(root.right, res);%0A        res%5B0%5D+= Math.abs(left-right);%0A        return left+right+root.val;%0A        %0A    %7D%0A%7D

The solution for 563