Smash The Bricks(NG)

Asked at Wayfair · Coding Questions · Difficulty: Medium · Last asked Jul 15, 2026

There are `n` bricks arranged in a row at positions numbered from `1` through `n`, inclusive. There is an array, `newtons[n]`, that contains an integer indicating the number of newtons required to smash a brick. (A newton is a unit of force.)

Loading the problem…