leetcode Container With Most Water python

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
上一篇:android 下 利用webview实现浏览器功能


下一篇:NLTK 统计词频