```
```class Solution {
public int maxArea(int[] height) {
int max = 0, lm = 0, rm = 0;
for(int i = 0; i < height.length - 1; ++i) {
if(height[i] < lm) continue;
lm = height[i];
rm = 0;
for(int j = height.length - 1; j > i; --j) {
if(height[j] < rm) continue;
rm = height[j];
int size = (j - i) * (height[i] < height[j] ? height[i] : height[j]);
if(size > max)
max = size;
if(rm > lm) break;
}
}
return max;
}
}

Beats 88.98 :)