deque doubly Algorithm

In computer science, a double-ended queue (abbreviated to deque, pronounced deck) is an abstract data type that generalizes a queue, for which components can be added to or removed from either the front (head) or back (tail).It is also often named a head-tail associated list, though properly this refers to a specific data structure implementation of a deque (see below).

deque doubly source code, pseudocode and analysis