Find the maximum water a pair of lines can hold using the two-pointer technique.
Constraints
Example
>>> max_area([1, 8, 6, 2, 5, 4, 8, 3, 7]) 49 >>> max_area([1, 1]) 1 >>> max_area([4, 3, 2, 1, 4]) 16 >>> max_area([1, 2, 1]) 2
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints