Tree: Depth-First Search - Path Sum
The classic Path Sum problem asks if there exists a root-to-leaf path with a sum equal to
targetSum. Suppose the problem is modified to find if any path (not necessarily root-to-leaf or downward) in the binary tree sums to targetSum. Which of the following algorithmic changes is necessary to solve this new problem?