Groups
Category
Level
Disjoint Set Union (Union-Find) maintains a collection of non-overlapping sets and supports fast merging and membership queries.
A queue is a First-In-First-Out (FIFO) line where you add at the back and remove from the front in O(1) time.
A monotonic deque is a double-ended queue that keeps elements in increasing or decreasing order so that the front always holds the current optimum (min or max).
A monotonic stack is a stack that keeps its elements in increasing or decreasing order to answer range queries in linear time.