Stacks

Problems on stacks, including bracket sequences, evaluating expressions, the nearest greater or smaller element, the largest rectangle in a histogram, a stack with a minimum, and undoing operations.

The stack article in the Data structures section explains the structure. Related problem sets are under Expression parsing and Data structures.

Problems