LeetCode Çözümlerİ – 404. Sum of Left Leaves [Facebook Mülakat Sorusu]

LeetCode içerisinde bulunan “Sum of Left Leaves”‘ sorusunun açıklaması ve çözümü. Bu soruda size verilen bir binary tree içerisindeki “left leaves” (ağacın en solunda olan ve alt node’ları olmayan) node’larının toplamı soruluyor. LeetCode’a göre bu soru daha önce Facebook mülakatlarında sorulan sorulardan biridir.

🔥 LeetCode 404. Sum of Left Leaves: https://leetcode.com/problems/sum-of-left-leaves/

➡️ Problem açıklaması: Find the sum of all left leaves in a given binary tree.

Example:

3

/ \

9 20

/ \

15 7

There are two left leaves in the binary tree, with values 9 and 15 respectively. Return 24.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.