How do you solve the path sum problem in a binary tree, and what is the subtlety?
As you descend the tree, subtract each node's value from the remaining target. When you reach a leaf, the path is valid exactly when the remaining target is zero. The subtlety is that only leaves count: a node whose remaining target happens to be zero but which still has children is not the end of a valid path, because the problem asks for root to leaf paths.
So the check for success must be made only when the node has no children, and otherwise you keep descending. This is the mistake that produces wrong answers: returning true as soon as the running sum equals the target, without checking whether you are at a leaf.
The mechanism is that the remaining target is the running state carried down the tree. Each level reduces it by the node's value, so at a leaf the remaining target is the target minus the sum of the path, and a zero remaining target means the path sums exactly.
The trade-off to name is the shape of the answer. If the question asks whether such a path exists, a boolean is enough and the recursion can stop at the first hit, which makes it much faster than the version that collects all paths. If it asks for all the paths, you have to keep going and you also have to copy the path list when you record it, because the same list is mutated as the recursion unwinds. A third variant asks for the count of such paths, which is the same traversal with a counter instead of a list.