Problem 364 · Medium

Nested List Weight Sum II

Add up nested lists of numbers where each value is weighted by its depth counted from the deepest level upward. The visual draws the nested brackets and shows each level's weight.

Open the interactive visualisation