I saw this problem: [Given a binary search tree and a number, find a path whose node's data added to be the given number.](https://stackoverflow.com/questions/8659736/given-a-binary-search-tree-and-a-number-find-a-path-whose-nodes-data-added-to) .

On it it says that Given a binary search tree and a number, find if there is a path from root to a leaf such that all numbers on the path added up to be the given number.

Everyone on that thread seems to know the recursive way to do this.

Am I missing something? How do you solve this recursively? Do you have to brute force the whole tree?

Can someone give an outline (rough idea) on how to do this?