QUEUE - A List of Elements  :
Print this page
 

Introduction:

1. It is basically a data object
2. Theoperational semantic of queue is FIFO i.e. first in first out                    

Definition :

It is an ordered list of elements n , such that n>0 in which all deletions are made at one end       called the front end and all insertions at the other end called the rear end . 

Primary operations defined on a Queue:

  1. EnQueue : This is used to add elements into the queue at the back end.
  2. DeQueue   : This is used to delete elements from a queue from the front end.
  3. Also "IsEmpty()" and "IsFull()" can be defined to test whether the queue is Empty or full.

Example :

1. PRACTICAL EXAMPLE : A line at a ticket counter for buying tickets operates on above rules  

2. IN COMPUTER WORLD : In a batch processing system, jobs are queued up for processing.

 
 
Prev