Deque, or
double-ended queue is a
data structure, which unites the properties of a
queue and a
stack. Like the stack, items can be
pushed into the deque; however once they're inside, the last item pushed in may be extracted from the one side (
popped, like in a stack), and the first item pushed in may be pulled out of the other side (like in a queue). Compare
Linked list,
Stack,
Queue, and
Array.