Problem 554 · Medium

Brick Wall

You have a brick wall with rows of varying brick widths. Find the vertical line that crosses through the least number of bricks.

Open the interactive visualisation