Give a binary tree, and a target number, find all path that the sum of nodes equal to target, the path could be start and end at any node in the tree.
Given binary tree:
1 / \ 2 3 / 4
and target =6. Return :
6
[ [2, 4], [2, 1, 3], [3, 1, 2], [4, 2] ]
可以拐弯了,但是最多拐一次。
难
Last updated 7 years ago