The Queue ADT

Queue Model
A Queue is a linear data structure which follows First In First Out (FIFO) principle, in which insertion is performed at rear end and deletion is performed at front end.
Example : Waiting Line in Reservation Counter,

Operations on Queue
The fundamental operations performed on queue are
1. Enqueue
2. Dequeue

Enqueue :
The process of inserting an element in the queue.

Dequeue :
The process of deleting an element from the queue.
Exception Conditions

Overflow : Attempt to insert an element, when the queue is full is said to be overflow condition.
Underflow : Attempt to delete an element from the queue, when the queue is empty is said to be underflow

Applications of Queue
* Batch processing in an operating system
* To implement Priority Queues.
* Priority Queues can be used to sort the elements using Heap Sort.
* Simulation.
* Mathematics user Queueing theory.
* Computer networks where the server takes the jobs of the client as per the queue strategy.

learn more
Trees
Previous
Next Post »