public int maxArea(int[] height) {
		int maxA = 0;
		int i = 0;
		int j = height.length - 1;

		while (i < j) {
			int curArea = (j - i) * (Math.min(height[i], height[j]));
			maxA = Math.max(curArea, maxA);
			if (height[i] < height[j])
				i++;
			else
				j--;
		}

		return maxA;
	}