| 1 | class Solution(object): |
| 2 | def maxArea(self, height): |
| 3 | """ |
| 4 | :type height: List[int] |
| 5 | :rtype: int |
| 6 | """ |
| 7 | |
| 8 | #print(height) |
| 9 | start=0 |
| 10 | end=len(height)-1 |
| 11 | max_area=0 |
| 12 | curr_area=0 |
| 13 | while(start!=end): |
| 14 | if(height[start]<height[end]): |
| 15 | curr_area=height[start]*(end-start) |
| 16 | start+=1 |
| 17 | else: |
| 18 | curr_area=height[end]*(end-start) |
| 19 | end-=1 |
| 20 | if(curr_area>max_area): |
| 21 | max_area=curr_area |
| 22 | print(curr_area) |
| 23 | return max_area |
nothing calls this directly
no outgoing calls
no test coverage detected