Basic of Queue in Data Structure

Queue in Data Structure

In this tutorial, We learn about Basic of Queue in Data Structure with this we also understand the basic Operations of queue, how a queue works in daily life and at last discusses the ultimate applications of queue in our daily life from ticket windows to a phone answering system.

What is Queue in Data Structure?

Queue is also a linear data structure that can be implemented either as an array or a linked list. Queue is open at both ends. Queue insertions take place at 'rear' end and deletions take place at 'front' end. Logically queue works on the concept of FIFO(First IN First OUT) data structure which means that element inserted first and deleted first.

In real life how to queue system works. If you go to deposit fees and you are first in a queue, then you will be the first one to deposit fees. Next, If you drive a vehicle on the one-way road where first enter vehicle exit first. 

Basic of Queue Operations:

  1. The process of add items in a queue is called Enqueue.
  2. The process of removing an item from the queue is called Dequeue.
Queue Data Structure
Queue Data Structure

In Queue 'front' stores the index of the first element in the queue and 'rear' stores the index of the last element in the queue, when a queue is an array. 

Applications of Queue:

  1. Queue is used in CPU task Scheduling when multiple processes require CPU at the same time.
  2. Queue also used in the call center system to hold the call in order until the representative free.
  3. When data is transfer asynchronously between two processes like IO Buffers.
  4. Queue is used in Round Robin scheduling.
  5. Operating System uses a queue to maintain processes of ready to executed or wait for a particular event to occur.
So, Above we learn queue data structure with some basic operations and its ultimate applications related to your daily life and later we discuss the implementation of a queue. If you have any doubts about the above topics then do not hesitate and comment below your query.

If you have any doubts, Please let me know

Previous Post Next Post

Contact Form