@@ -0,0 +1,562 @@
+import java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Apublic class TreeNode %7B%0A    int val;%0A    TreeNode left;%0A    TreeNode right;%0A    TreeNode(int x) %7B val = x; %7D%0A%7D%0A%0Aclass Solution %7B%0A    public int sumNumbers(TreeNode root) %7B%0A        return sum(root, 0);%0A    %7D%0A    %0A    public int sum(TreeNode n, int s)%7B%0A        if (n == null) %7B %0A            return 0;%0A        %7D%0A        if (n.right == null && n.left == null) %7B%0A            return s * 10 + n.val;%0A        %7D%0A        return sum(n.left, s * 10 + n.val) + sum(n.right, s * 10 + n.val);%0A    %7D%0A%7D

129. Sum Root to Leaf Numbers