Overview
A Deque is a double-ended queue. It supports pushing and popping from either end, commonly using a circular buffer or linked block representation.
Stores items so insertion and removal are efficient at both the front and the back.
Compact metadata for implementation and discovery.
A Deque is a double-ended queue. It supports pushing and popping from either end, commonly using a circular buffer or linked block representation.
Quick facts
Runtime and memory behavior at a glance.
Best
O(1)
Average
O(1)
Worst
O(1)
Space
O(n)
index = (base + offset) mod capacityMaps logical deque positions into a circular array.
Show the structure layout and how operations move through or update it.
Deque operations are useful building blocks for BFS variants and sliding-window algorithms.
What each reference supports for this entry.
Textbook reference for the algorithmic family and analysis of Deque.
Good next jumps from the relationship graph, ranked for useful discovery.
A deque or queue supports breadth-first frontier order.
Circular buffers are a common way to implement deque-like storage.