Types of Deque
There are two variants of a double-ended queue. They include :
- Input restricted queue
- Output restricted queue
Input Restricted Queue
In Input restricted double ended queue, insertions can be done only at one of the end, while deletions can be done from both ends.
Output Restricted Queue
In output restricted double ended queue, deletions can be done only at one of the end, while insertions can be done on both ends.
C implementation Double-Ended Queue
The double-ended queues, called deques for short, are a generalized form of the queue. It is exactly like a queue except that it does not follow the FIFO rule (First in first out) so, the elements can be added to or removed from either the front(head) or back(tail) of the deque.
In this article, we will learn about the double-ended queue implementation in C. We will also look at the working of the double-ended queue and the basic operations that can be performed using the double-ended queue in C.
Contact Us