| tags |
|
||||||
|---|---|---|---|---|---|---|---|
| date | 2025-09-26 |
A deque, also known as a double-ended queue, is an ordered collection of items similar to the queue. It has two ends, a front and a rear, and the items remain positioned in the collection.
In a sense, this hybrid linear structure provides all the capabilities of stacks and queues in a single data structure.
It is important to note that even though the deque can assume many of the characteristics of stacks and queues, it does not require the LIFO and FIFO orderings that are enforced by those data structures.