Find the sum of all left leaves in a given binary tree.
Example
1 | 3 |
There are two left leaves in the binary tree, with values 9 and 15 respectively. Return 24.
Code
1 | public class TreeNode { |
1 | public int sumOfLeftLeaves(TreeNode root) { |
写BUG的程序猿
Find the sum of all left leaves in a given binary tree.
1 | 3 |
There are two left leaves in the binary tree, with values 9 and 15 respectively. Return 24.
1 | public class TreeNode { |
1 | public int sumOfLeftLeaves(TreeNode root) { |