rewrite leetcode path sum i ii