3467. Find the Level of Tree with Minimum Sum

Medium
Tree
Depth-First Search
Breadth-First Search
Binary Tree

Description

Hints

Hint 1
Run a DFS on the tree and update an array sum where sum[i] is the sum for level i.
Hint 2
The answer is the first minimum element of sum.

Statistics

Acceptance
69.3%
Submissions
4,373
Accepted
3,030