Sum of Left Leaves

Easy · Trees · about 10 minutes

Asked at Amazon, Google, Meta, Adobe.

Return the sum of all left leaves of a binary tree: leaves that are the left child of their parent.

Related guides