Lecture
Double-ended queue (colloq. deque, from English deque — double ended queue; two-sided queue, a queue with two ends) — an abstract data type in which elements can be added and removed both at the beginning and at the end. It can be implemented using a doubly linked list.
A double-ended queue can be used to store browsing history: new websites are added to the end of the queue, and the oldest entries are removed when the history becomes too large. When the user asks to clear the browsing history for the last hour, the most recently added entries are removed.
Comments