It is a linear list where items can be inserted or deleted at either end but not from the middle so, we can insert or delete elements from both the rear and from the end. Hence it is also called a Double Ended Queue (DEQUE). There are two types of DEQUE due to the insertion of performing insertion and deletion only at one end.
- Input Restricted DEQUE
- Output Restricted DEQUE
Input Restricted DEQUE:
Here insertion can be done at one end of the list but it allows deletion from both the rear and front end.
Output Restricted DEQUE:
Here deletion can be done at one end of the list but it allows insertion from both the rear and front end.