/    /  Data Structures-Queue

Queue

 

A queue is an ordered list that enables insert operations to be performed at the rear end and delete operations at the front end. It is also referred to as the first in and first out(FIFO) list. 

 

Applications of a queue:

The queue has the following applications:

  1. It is used as the waiting list for a single shared resource. 
  2. The operating systems use it to handle interrupts.
  3. It is used to handle the playlists in media players.
  4. In various applications, it is used as the buffer.
  5. It is used in the asynchronous transfer of data.

 

Operations of a queue:

Major queue operations are initializing the queue, managing and using it, and then deleting it from the memory. 

The basic operations of the queue are as follows:

  1. enqueue()
  2. dequeue()
  3. peek()
  4. isFull()
  5. isEmpty()

 

Reference

Queue