key:
1.a group with two point from the both side.
2 calcu current area&& update maxarea && update the point with short height
3. do 2 until two point meet
int maxArea(vector<int> &height) {
int len = height.size();
int i = 0, j = len-1;
int res = 0, temp = 0;
while(i < j){
if(height[i] < height[j]){
temp = height[i] * (j-i);
i++;
}else{
temp = height[j] * (j-i);
j--;
}
res = max(res, temp);
}
return res;
}