class Solution(object):
def maxArea(self, height):
"""
:type height: List[int]
:rtype: int
""" intSum = len(height)
if intSum <= 1:
return False
maxVol=0
left=0
right=intSum-1
while left < right:
maxVol=max(maxVol,(right-left)*min(height[left],height[right]))
if height[left] < height[right]:
left+=1
else:
right-=1
return maxVol
相关文章
- 10-10[LeetCode][Python]Container With Most Water
- 10-10【LeetCode】【Python解读】Container with most water
- 10-10【LeetCode】11. Container With Most Water
- 10-10[leetcode 11] Container With Most Water
- 10-10LeetCode.11-装水最多的容器(Container With Most Water)
- 10-10*11. Container With Most Water
- 10-10Container With Most Water
- 10-10刷题11. Container With Most Water
- 10-10LeetCode11 Container With Most Water 盛最多水的容器
- 10-1011. Container With Most Water