solve(levelOrder, target) — return true if the tree has a **root-to-leaf
path** whose values add up to target.
A *leaf* is a node with no children, so a path must end on a leaf: stopping at an
inner node does not count.
Examples
solve([5, 4, 8, 11, null, 13, 4, 7, 2, null, null, null, 1], 22) → true // 5 → 4 → 11 → 2
solve([1, 2, 3], 5) → false
solve([1, 2], 1) → false // 1 is not a leaf
solve([], 0) → falseValues can be negative, so you cannot prune a branch just because the running
sum went past the target.
Sample tests