Skip to content

Commit b8636c2

Browse files
authored
Create 。。。.md
1 parent 97c4cce commit b8636c2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

2018.11.26-leetcode11/。。。.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
public int maxArea(int[] height) {
2+
int left=0,right=height.length-1,area = 0;
3+
while (left < right){
4+
area = Math.max(area,(right-left)*Math.min(height[left],height[right]));
5+
if (height[left] < height[right]){
6+
left++;
7+
}else {
8+
right--;
9+
}
10+
}
11+
return area;
12+
}

0 commit comments

Comments
 (0)