Deques
A deque (usually pronounced “deck,") is a queue that allows to add items to and remove items from either end of the queue.
Deques are useful in algorithms where you have partial information about the priority of items. For example, might know that some items are high priority and others are low priority, but you might not necessarily know the exact relative priorities of every item.
Deques are easy to build with doubly linked lists.
Last updated