public int maxArea(int[] height) {
		if (height.length == 0) {
			return 0;
		}
		int result = 0;
		int left = 0;
		int right = height.length - 1;
		while (left < right) {
			int lh = height[left];
			int rh = height[right];
			int temp = (right - left) * Math.min(lh, rh);
			if (temp > result) {
				result = temp;
			}

			if (lh < rh) {
				while (left < right && height[left] <= lh) {
					left++;
				}
			} else {
				while (left < right && height[right] <= rh) {
					right--;
				}
			}

		}
		return result;
	}