Opentopia Directory Encyclopedia Tools

Deque

Encyclopedia : D : DE : DEQ : Deque


In computer science, a deque (short for double-ended queue) is a data structure for which elements can be added to or removed from the front or back. This differs from a normal queue, where elements can only be added to one end and removed from the other. A deque maintains a slightly modified FIFO structure, doing so using each end as both left and right. A common implementation of a deque uses a doubly linked list.

Deque is usually pronounced deck, possibly due to the conceptual similarity to a deck of cards, where a card can be dealt from or returned to either the face or patterned side.

Naming

Deque is sometimes written dequeue, but this is generally not preferred because of dequeue's existing meaning as a verb: "to remove from a queue". Nevertheless, several libraries and some writers, such as Aho, Hopcroft, and Ullman in their textbook Data Structures and Algorithms, spell it dequeue.

Operations

The following operations are possible on a deque:

Complexity

See also

References

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: