Container With Most Water @ LeetCode (Python)
kitt
posted @ 2014年4月14日 20:39
in LeetCode
, 2601 阅读
class Solution: # @return an integer def maxArea(self, height): L, R, maxV = 0, len(height) - 1, -1 while L < R: maxV = max(maxV, min( height[L], height[R] ) * (R - L) ) if height[L] <= height[R]: L += 1 else: R -= 1 return maxV
2014年4月22日 04:48
我给你发邮件了,不知道你看到了没有,想问下你有做过4sum这个题吗?我这个也ac不了。。。
2014年4月24日 02:00
@zuoyuan: 已经贴出来了~