@@ -0,0 +1,895 @@
+class Solution %7B%0A    public int calculateArea(int%5B%5D heights, int start, int end) %7B%0A        Deque%3CInteger%3E stack = new ArrayDeque%3C%3E();%0A        stack.push(-1);%0A        int n = heights.length;%0A        int maxArea = 0;%0A        %0A        for (int i = 0; i %3C n; i++) %7B%0A            while ((stack.peek() != -1)%0A                    && (heights%5Bstack.peek()%5D %3E= heights%5Bi%5D)) %7B%0A                int currentHeight = heights%5Bstack.pop()%5D;%0A                int currentWidth = i - stack.peek() - 1;%0A                maxArea = Math.max(maxArea, currentHeight * currentWidth);%0A            %7D%0A            %0A            stack.push(i);%0A        %7D%0A        %0A        while (stack.peek() != -1) %7B%0A            int currentHeight = heights%5Bstack.pop()%5D;%0A            int currentWidth = n - stack.peek() - 1;%0A            maxArea = Math.max(maxArea, currentHeight * currentWidth);%0A        %7D%0A        %0A        return maxArea;%0A    %7D%0A%7D%0A

Create LargestRectangleHistogram.java