Liquid Settling on Uneven Columns

Asked at Airbnb · Coding Questions · Difficulty: Medium · Last asked Feb 28, 2026

A strip of ground is given as a list of column heights. Water is poured onto one column, one unit at a time. Each unit of water flows to the place where it settles and raises the height of that column by 1, so ground and settled water together form the current height. Simulate all the units and return the final heights.

Loading the problem…