Appearance
用递归是真的方便啊
function hasSumPath(root, sum) { if (root == null) return false if (root.left == null && root.right == null) return root.val == sum return hasSumPath(root.left, sum - root.val) || hasSumPath(root.right, sum - root.val) }