Problem 1080 · Medium

Insufficient Nodes in Root to Leaf Paths

Pass the running sum down; a leaf below the limit is removed, and an inner node is removed once both of its children are gone.

Open the interactive visualisation