https://leetcode-cn.com/problems/container-with-most-water/
class Solution {
public int maxArea(int[] height) {
int max = 0;
for(int i=0,j=height.length-1;i<j;){
int h = height[i] < height[j] ? height[i++]:height[j--]; // 谁的长度矮,移动谁。
int area = (j-i+1) * h;
max = Math.max(max,area);
}
return max;
}
}