public int pathSum(Node root, int sum) {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(0, 1);
        return countPathSum(root, sum, map, 0);
    }
https://leetcode.com/problems/path-sum-iii/description/
src/com/interview/tree/CountPathSum.java