public int maxArea(int[] height) {
        if(height == null || height.length == 0) return 0;
        int max = 0;
        int start = 0, end = height.length - 1;
        while(start < end){
            int temp = getMin(height[start], height[end]) * (end - start);
            if(temp > max) max = temp;
            if(height[start] < height[end]){
                start++;
            } else {
                end--;
            }
        }
        return max;
    }