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