Container with Most Water

heightsArray
[1, 8, 6, 2, 5, 4, 8, 3, 7]
1def maxArea(heights):
2    left = 0
3    right = len(heights) - 1
4    max_area = 0
5
6    while left < right:
7        width = right - left
8        height = min(heights[left], heights[right])
9        current_area = width * height
10        max_area = max(max_area, current_area)
11
12        if heights[left] < heights[right]:
13            left += 1
14        else:
15            right -= 1
16
17    return max_area
0 / 27
108162235445863778