Double Ended Queue

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.


deque by tutorialsinhand.com


Types of DEQUE

There are two types of deque based on the restrictions imposed to perform either insertions or deletions only at one end.

They are:

  1. Input-restricted deque
  2. Output-restricted deque

Please Share this page
Views : 14