Skip to content

Glossary: Coding Interviews in C++

Monotonic stack

A stack kept in increasing (or decreasing) order by removing items that break the order as new ones arrive. It is used to answer "next bigger value" questions in O(n).

Where the book teaches it

Related terms

Stack