@@ -0,0 +1,460 @@
+/**%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 boolean hasPathSum(TreeNode root, int sum) %7B%0A    if (root == null) return false;%0A    if (root.left == null && root.right == null) return root.val == sum;%0A    return hasPathSum(root.left, sum - root.val) %7C%7C hasPathSum(root.right, sum - root.val);%0A  %7D%0A%7D%0A

add path-sum solution