路径总和 原做法, 用了sum保存根节点到当前节点的值 class Solution { public boolean hasPathSum(TreeNode root, int targetSum) { return recur(root, targetSum, 0); } public boolean recur(TreeNode root, int targetSum, int sum) { if(root == null) return false; sum += root.val; ...