Problem 3157 · Medium

Find the Level of Tree with Minimum Sum

Sweep the tree one level at a time, summing node values, and keep the earliest level with the smallest total.

Open the interactive visualisation