Monday, December 16, 2013

What is Queue ? Examples of Queue ?

  1. Stores a set of elements in a particular order
  2. Stack principle: FIRST  IN  FIRST  OUT
  3. = FIFO
  4. It means: the first element inserted is the first one to be removed
  5. Example
The first one in line is the first one to be served

Real life examples
  1. Waiting in line
  2. Waiting on hold for tech support
Applications related to Computer Science
  1. Threads
  2. Job scheduling (e.g. Round-Robin algorithm for CPU allocation)

No comments:

Post a Comment