Tap here to switch tabs
Problem
Submissions

Problem: Deepest Leaves Sum

Deepest Leaves Sum gives you a binary tree and asks for the total of the values stored in its leaves at the greatest depth, combining all leaves tied for deepest.

Statement

Given the root of a binary tree, return the sum of the values of its deepest leaves.

Constraints:

  • The number of nodes in the tree is in the range [1,104][1, 10^4].

  • 1≤1 \leq Node.val ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Deepest Leaves Sum

Deepest Leaves Sum gives you a binary tree and asks for the total of the values stored in its leaves at the greatest depth, combining all leaves tied for deepest.

Statement

Given the root of a binary tree, return the sum of the values of its deepest leaves.

Constraints:

  • The number of nodes in the tree is in the range [1,104][1, 10^4].

  • 1≤1 \leq Node.val ≤100\leq 100