Concepts40
🗂️Data StructureIntermediate
Ordered Set and Map
std::set and std::map store elements in sorted order using a balanced binary search tree (typically a Red-Black Tree).
#ordered set#ordered map#std::set+12
🗂️Data StructureIntermediate
Queue and Deque
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.
#queue#deque#fifo+12
🗂️Data StructureIntermediate
Monotonic Deque
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).
#monotonic deque#sliding window maximum#sliding window minimum+12
🗂️Data StructureIntermediate
Monotonic Stack
A monotonic stack is a stack that keeps its elements in increasing or decreasing order to answer range queries in linear time.
#monotonic stack#next greater element#previous smaller element+12