Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404. Sum of Left Leaves #12

Open
F4NT0 opened this issue Apr 20, 2024 · 0 comments
Open

404. Sum of Left Leaves #12

F4NT0 opened this issue Apr 20, 2024 · 0 comments
Assignees
Labels
Easy Easy Questions Ready to code Description from the Question was updated with code and text

Comments

@F4NT0
Copy link
Owner

F4NT0 commented Apr 20, 2024

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

  • 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
@F4NT0 F4NT0 added the Easy Easy Questions label Apr 20, 2024
@F4NT0 F4NT0 added this to the April Leetcode milestone Apr 20, 2024
@F4NT0 F4NT0 self-assigned this Apr 20, 2024
@F4NT0 F4NT0 added the Ready to code Description from the Question was updated with code and text label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy Easy Questions Ready to code Description from the Question was updated with code and text
Projects
None yet
Development

No branches or pull requests

1 participant