A queue is a linear data structure which follows First In First Out (FIFO) principle, in which insertion is performed at rear end deletion is performed at front end.
Types of queue:
- Simple queue(Ordinary queue)
- Circular queue.
- Double ended queue.
- Priority queue.
Operations on queue:
The fundamental operations performed on queue are,
- Enqueue
- Dequeue
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:
- When jobs are submitted to a printer they are arranged in order of arrival. thus jobs sent to a line printer are placed on queue.
- Batch processing in an operating system.
- Simulation.
- Mathematics user Queuing theory.
- To implement priority queue.
- Time sharing system.
No comments:
Post a Comment