public int largestRectangleAreaBF(int[] height) {
        int area;
        int maxarea = 0;

        for (int i = 0; i < height.length; i++) {
        	if (i > 0 && height[i] == height[i-1])
        		continue;
        	area = height[i];
        	// Expand to left
        	for (int j = i - 1; j >= 0; j--) {
        		if (height[j] >= height[i])
        			area += height[i];
        		else
        			break;
        	}
        	for (int j = i + 1; j < height.length; j++) {
        		if (height[j] >= height[i])
        			area += height[i];
        		else
        			break;
        	}
        	if (area > maxarea)
        		maxarea = area;
        }
        return maxarea;
    }