Given a length of n Array of integers for height . Yes n Vertical line , The first i The two ends of the line are (i, 0) and (i, height[i]) .
Find two of them , Make them x A container of shafts can hold the most water .
Return the maximum amount of water that the container can store .


def maxArea(self, height: List[int]) -> int:
i,j,res = 0,len(height)-1,0
while i<j:
if height[i]<height[j]:
res = max(res,height[i]*(j-i))
i +=1
else:
res = max(res,height[j]*(j-i))
j -=1
return res
Plotly The express module draws several charts, which is really amazing!!
I believe you are familiar wit
Let you thoroughly understand the inversion value of Python Programming classic case [examination question]
Study Python There are many di