| largest-rectangle-in-histogram

Use Segment Tree O((logn)^2) AC