class Solution(object):
def maxArea(self, height):
"""
:type height: List[int]
:rtype: int
"""
length = len(height)
if length == 2:
return min(height[0],height[1])
i = 0
j = length - 1
mx = 0
while(i<j):
mx = max(mx,(j-i)*min(height[j],height[i]))
if height[i]<height[j]:
i += 1
else:
j -= 1
return mx