Description
Find the sum of all left leaves in a given binary tree.
Example:
1 | 3 |
The original problem is here.
My Solution
I solve this problem in C++, as below:
1 | /** |
Note
To solve the problem, traverse the tree recursively, if the node is left leaf add the value to the result.