Container With Most Water — two pointers
Two lines and the x-axis form a container. Start wide, then always move the shorter line inward — the only move that can find a taller container.
Try:
← Prev
Next →
▶ Play
Reset
width × height
=
0
best area
0