Queues
Queues are abstract data structures that are meant to emulate the workings of real life queues. They are used extensively in various applications, such resource allocation, scheduling, sorting, and many others. They are typically implemented using a double linked list, although many other implementations exists. A queue usually consists of two operations; an enqueue operation, where items are added to the rear of the queue, and an opposite dequeue operation, where items are removed from the front of the queue. These two operations make the mode of operation of this data structure First In First Out (FIFO).
We can implement an efficient queue using a double linked list. This enables us implement the dequeue operation by removing an ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access