Container With Most Water

Two pointers · Move the limiting side · Stretch · about 24 min

Why it matters

This teaches the proof behind a pointer move, not just the movement itself.

How it connects

The two pointers still close in, but now you must justify which pointer is safe to move.

Try first

Area is width × shorter height. Which height currently limits you?

Interview cue

I move only the limiting wall because width always shrinks, so the shorter height must improve.