Stack & Queue
LIFO and FIFO containers, deques, monotonic variants and priority queues.
A last-in, first-out collection where all insertions and removals happen at one end, the top.
A first-in, first-out collection: elements enter at the back and leave from the front.
A fixed-capacity queue over an array whose head and tail indices wrap around using modular arithmetic.
A queue that supports O(1) insertion and removal at both the front and the back.
A stack whose elements are kept in sorted order by popping everything that would violate the order before each push.
A deque kept in sorted order so the max (or min) of a sliding window is always at the front.
An abstract queue where the element with the highest (or lowest) priority is always removed first, typically backed by a binary heap.