Given the root of a binary tree and a target sum, return all root-to-leaf paths where the sum equals targetSum.
Input: root=[5,4,8,11,null,13,4,7,2,null,null,5,1], targetSum=22 Output: [[5,4,11,2],[5,8,4,5]]
Unlock hints progressively β start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features