:type height: List[int] :rtype: int
(self, height)
| 139 | """ |
| 140 | class Solution(object): |
| 141 | def maxArea(self, height): |
| 142 | """ |
| 143 | :type height: List[int] |
| 144 | :rtype: int |
| 145 | """ |
| 146 | l, r = 0, len(height)-1 |
| 147 | |
| 148 | currentMax = 0 |
| 149 | |
| 150 | while l != r: |
| 151 | currentMax = max(min(height[r], height[l]) * (r-l), currentMax) |
| 152 | if height[r] > height[l]: |
| 153 | l += 1 |
| 154 | else: |
| 155 | r -= 1 |
| 156 | |
| 157 | return currentMax |
nothing calls this directly
no outgoing calls
no test coverage detected