~/boss / water-pillars
Two pointers (container with most water)
The Reservoir
Pick two pillars that hold the most water. Check 8 pairs, not 36.
Loading the fight…
How to beat it
Start with the widest pair, one pointer at each end. The water is the shorter pillar times the width. Save it if it's your best, then move the shorter pillar inward: moving the taller one only shrinks the width, and the shorter one still caps the water.
Now the real boss
Interviews ask for the code. Watch it run, then write it yourself, tested in Python, C++ or Java.
On your phone? Writing code is easier on a laptop: open bossfight.dev/problems/container-with-most-water there. Sign in with your email to keep your progress on every device.