Remove Duplicates from Sorted List II @ LeetCode (Python)
4Sum @ LeetCode (Python)

Container With Most Water @ LeetCode (Python)

kitt posted @ 2014年4月14日 20:39 in LeetCode , 2686 阅读
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
Avatar_small
zuoyuan 说:
2014年4月22日 04:48

我给你发邮件了,不知道你看到了没有,想问下你有做过4sum这个题吗?我这个也ac不了。。。

Avatar_small
kitt 说:
2014年4月24日 02:00

@zuoyuan: 已经贴出来了~


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter