The largest rectangle 84. Histogram
Front
Monotonous stack
practice
Rectangular sections consisting of continuous, that is to look at a minimum, to obtain a first small left of each position its height, the right side is also the same token, this block as a minimum limit. Require two monotonous stack
Monotonically incrementing the stack maintenance intervals, each pop stack is not satisfied, the way to use this stack and calculates the current position to cover the length of the stack is used to calculate. Only once monotonous stack