@@ -0,0 +1,539 @@
+public class LeetCode0563 %7B%0A%09static class TreeNode %7B%0A%09%09int val;%0A%09%09TreeNode left;%0A%09%09TreeNode right;%0A%0A%09%09TreeNode(int x) %7B%0A%09%09%09val = x;%0A%09%09%7D%0A%09%7D%0A%0A%09public int findTilt(TreeNode root) %7B%0A%09%09if (root == null) %7B%0A%09%09%09return 0;%0A%09%09%7D%0A%0A%09%09int%5B%5D result = new int%5B1%5D;%0A%09%09handleSub(root, result);%0A%09%09return result%5B0%5D;%0A%09%7D%0A%0A%09private int handleSub(TreeNode root, int%5B%5D result) %7B%0A%09%09if (root == null) %7B%0A%09%09%09return 0;%0A%09%09%7D%0A%0A%09%09int l = handleSub(root.left, result);%0A%09%09int r = handleSub(root.right, result);%0A%0A%09%09result%5B0%5D += Math.abs(l - r);%0A%0A%09%09return l + r + root.val;%0A%09%7D%0A%7D%0A

Add LeetCode0563.java