public int maxArea1(int[] height) {
        if(height == null || height.length == 0) return 0;
        List<Integer> increase = new ArrayList<Integer>();
        increase.add(0);
        int max = 0, temp;
        for(int i = 1; i < height.length; i++){
            int lastIndex = increase.get(increase.size()-1);
            for(int j = 0; j < increase.size(); j++){
                temp = getMin(height[i], height[increase.get(j)]) * (i - increase.get(j));
                if(temp > max) max = temp;
                if(height[i] < height[increase.get(j)]) break;
                if(height[lastIndex] * (i - increase.get(j)) < max) break;
            }
            if(height[lastIndex] < height[i]){
                increase.add(i);
            }
        }
        return max;
    }