Problem
Find the maximum area formed by choosing two vertical lines from the array.
Example 1
Input: height = [1,8,6,2,5,4,8,3,7]
Output: 49
Constraints
- 2 <= height.length <= 10^5
- 0 <= height[i] <= 10^4
Notes
- Focus on the underlying two pointers pattern.
- Write the cleanest correct solution before optimizing further.
- Hidden tests cover larger edge cases than the visible examples.