Queues
Activity Outcomes:
This lab teaches you the following topics:
- How to access the front and rear pointers
- How to enqueuer/insert the data
- How to dequeuer/ delete the data
Introduction
A queue is also a special case of a singly-linked list, which works according to FIFO algorithm.
Of the two ends of the queue, one is designated as the front − where elements are extracted (operation called dequeue), and another is the rear, where elements are inserted (operation called enqueue).
A queue may be depicted as in Figure below:
The main operations are:
Enqueue − place an element at the tail of the queue;
Dequeue − take out an element form the front of the queue;
Delete −delete the whole queue
Related links
Single link list Stack AVL Trees Binary search Counting Sort
Doubly link list Queue Graphs Bubble Sort Radix sort
Circular link list Binary search tree Hashing Insertion Sort Bucket Sort
Josephus Problem Tree Traversal Heaps Quick Sort Merge Sort
At Cui tutorial, courses, past papers and final year projects
#tutorial #cui #pastpaper #courses