Deque
Deque stands for Double Ended Queue. The insertion occurs at the rear end and the deletion occurs at the front end, and deque is a linear data structure in which deletion and insertion occur at both ends.
It can be used as a stack and queue both.
There are two types of queue:
- Input-restricted queue
- Output-restricted queue
Operations of deque
The following operations of deque are as follows:
- Insert at front
- Insert at rear
- Delete from front
- Delete from rear
- isFull()
- isEmpty()
Applications of deque
- It can perform both redo and undo operations.
- It is also used for multiprocessor scheduling.
- It can be used as a palindrome checker.
Example of a program of the deque

Reference
Deque