Binary Tree Paths With Target Sum
Given the root of a binary tree and an integer targetSum, return all root-to-leaf paths whose node values sum exactly to targetSum.
A leaf is a node with no left or right child.
Return every val...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
