public int largestRectangleArea(int[] height) {
		if (height == null || height.length == 0)
			return 0;
		Stack<Integer> S = new Stack<>();
		int max = 0;
		int j = 0;
		for (int i = 0; i <= height.length; i++) {
			int h = i < height.length ? height[i] : 0;
			if (S.isEmpty() || h >= height[S.peek()]) {
				S.push(i);
			} else {
				while (!S.isEmpty() && h < height[S.peek()]) {
					j = S.pop();
					if (S.isEmpty()) {
						max = Math.max(max, i * height[j]);
					} else {
						max = Math.max((i - S.peek() - 1) * height[j], max);
					}
				}
				S.push(i);
			}
		}
		return max;
	}