Double ended queue or DEQUE allows insertion and deletion of the elements from both the ends of the queue.
We can insert element from both the rear end and front end of the queue.
Similarly we can also delete element from both front end and rear end of the queue.
Given below is the diagrammatic representation of deque.
Types of DEQUE
There are two types of deque based on the restrictions imposed to perform either insertions or deletions only at one end.