Write a program to find the sum of all left leaves in a given binary tree.

Problem Note

  • A leaf node is a node having no child node.

Example

Input: Given binary tree, [5, 3, 6, 8, -1, 9, -1]
      5
     / \
    3   6
   /   /
  8   9
Output: 17
Explanation: There are two left leaves in the binary tree, with values 8 and 9 respectively. Hence, the sum is 17.