[Java] Pass new test case with dfs + map - O(n)
New test case:\n[1000000000,1000000000,null,294967296,null,1000000000,null,1000000000,null,1000000000]\n0\nJust change the type of key from Integer to Long\n\nj
New test case:\n[1000000000,1000000000,null,294967296,null,1000000000,null,1000000000,null,1000000000]\n0\nJust change the type of key from Integer to Long\n\n```java\n    public int pathSum(TreeNode root, int targetSum) {\n        Map<Long, Integer> map = new HashMap<>();\n        map.put(0L, 1);\n        return helper(root, (long) targetSum, 0, map);\n    }\n\n    private int helper(TreeNode node, long targetSum, long preSum, Map<Long, Integer> map) {\n        if (node == null) {\n            return 0;\n        }\n        preSum += node.val;\n        int res = map.getOrDefault(preSum - targetSum, 0);\n        map.put(preSum, map.getOrDefault(preSum, 0) + 1);\n        res += helper(node.left, targetSum, preSum, map) + helper(node.right, targetSum, preSum, map);\n        map.put(preSum, map.get(preSum) - 1);\n        return res;\n    }\n```
['Depth-First Search', 'Java']