Skip to content

Commit

Permalink
Merge pull request #487 from sumiranverma/patch-9
Browse files Browse the repository at this point in the history
Create question.md
  • Loading branch information
bh-g authored Jan 23, 2024
2 parents 58805f2 + 2f783f4 commit a2136e2
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Day-22/q2: Sum of Left Leaves/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Given the `root` of a binary tree, return the sum of all left leaves.

A **leaf** is a node with no children.
A **left leaf** is a leaf that is the left child of another node.

### **_Example 1_**

![image](https://github.com/SnowScriptWinterOfCode/LeetCode_Q/assets/112773734/82f26aff-30a7-4d6e-91ad-dd0cdc562ff6)

**Input**: root = [3,9,20,null,null,15,7]
**Output**: 24
**Explanation**: There are two left leaves in the binary tree, with values 9 and 15 respectively.

### **_Example 2_**

**Input**: root = [1]
**Output**: 0


### Constraints:

- The number of nodes in the tree is in the range `[1, 1000]`.
- `1000` <= Node.val <= `1000`

### problem link:
https://leetcode.com/problems/sum-of-left-leaves/

0 comments on commit a2136e2

Please sign in to comment.