Practice40 min

Practice: Walls & Water

The move-the-shorter-side argument and tracking running maxima from both ends.

Two geometry-flavored classics: Container With Most Water is the move-the-loser argument in its purest form, and Trapping Rain Water extends it — each side tracks its running maximum, and the side with the smaller max is the one that's safe to resolve.

Solving all problems completes this lesson automatically.