KUMAR SHIVAM

Define Queue. Explain Applications of Queue ? 

Data Structures and Algorithms

Answer in Short

Queue, as the name suggests is used whenever we need to have any group of objects in an order in which the first one coming in, also gets out first while the others wait for there turn, like in the following scenarios :

Explanation

969    0

==> Queue--

  • Queue is a first in first out FIFO linear data structure Queue is an important data structure for computer applications even.
  • Queue is linear data structure in which deletion of element can take place only at one end called the front end and insertion can take place at the other end called the rear.

==> Applications of Queue--

  • Queue, as the name suggests is used whenever we need to have any group of objects in an order in which the first one coming in, also gets out first while the others wait for there turn, like in the following scenarios : 
  1. Serving requests on a single shared resource, like a printer, CPU task scheduling etc.
  2. In real life, Call Center phone systems will use Queues, to hold people calling them in an order, until a service representative is free.
  3. Handling of interrupts in real-time systems. The interrupts are handled in the same order as they arrive, First come first served. 


Share:   

More Questions from Data Structures and Algorithms Module 2