Path Sum
Signals to notice
Brute force first
Enumerate all root-to-leaf paths, check sums — same complexity but less elegant. That direct path helps you understand the question, but it tends to treat every possibility as brand new instead of learning from earlier steps.
The key insight
DFS: subtract node value from target, check if leaf with remaining = 0. The goal is not to be clever for its own sake, but to remember the one relationship that keeps the solution grounded as you move forward.
What must stay true
At each node, reduce the target by the node's value — a leaf with remaining target 0 means success. If that remains true after every update, the rest of the reasoning has a stable place to stand.
Easy way to go wrong
Checking non-leaf nodes — the path must go all the way to a leaf (no children). The fix is usually to return to the meaning of each move, not just the steps themselves.