From 2f783f43dc143e6b6c3f49b04d9f295d9a836965 Mon Sep 17 00:00:00 2001 From: Sumiran Verma <112773734+sumiranverma@users.noreply.github.com> Date: Tue, 23 Jan 2024 20:26:19 +0530 Subject: [PATCH] Create question.md --- Day-22/q2: Sum of Left Leaves/question.md | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Day-22/q2: Sum of Left Leaves/question.md diff --git a/Day-22/q2: Sum of Left Leaves/question.md b/Day-22/q2: Sum of Left Leaves/question.md new file mode 100644 index 00000000..4008e171 --- /dev/null +++ b/Day-22/q2: Sum of Left Leaves/question.md @@ -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/