404 Sum of Left Leaves
Find the sum of all left leaves in a given binary tree.
Example:
Complexity: O(N) time and space The Idea: Use any kind of traversal and keep track when you are on a left or right branch.
Last updated
Find the sum of all left leaves in a given binary tree.
Example:
Complexity: O(N) time and space The Idea: Use any kind of traversal and keep track when you are on a left or right branch.
Last updated