NumPy allowed · plain Python earns 10 bonus points
Implement the greedy two-pointer solution to Container With Most Water -- the classic proof that checking every pair (O(n^2)) is unnecessary once you see WHY moving the shorter pointer is always the only move worth making.
Implement max_area(heights): start with pointers at both ends. At each step, compute the area between them, then move whichever pointer points at the SHORTER line inward (moving the taller one can only ever decrease or maintain the width-limited-by-the-short-side area).
max_area(heights: list[int]) -> int