Category
Level
A monotonic stack is a stack that keeps its elements in increasing or decreasing order to answer range queries in linear time.