Sunday, 25 September 2011

Queues


Queues:
Definition
The Abstract Data Type





Disadvantages of Queues


Definition:


A queue an ADT (Abstract Data Type) data structure , which data can only be inserted at one end, called the rear, and deleted from the other end, called the front. 
Queues are called First In First Out(FIFO) Data Structures means 1st inserted value is first deleted.

 

Order of insertion:
1. Element A inserted first
2. Element B is inserted after A
3. Element C is inserted after C
Order of deletion:
1. Element A is deleted first
2. Element B be deleted after A. Note that it is not possible to delete element B before deleting element A
3. Element C is deleted after B. Note that it is not possible to delete element C before deleting element B


Types of the Queues:

1. Queue or Liner Queue
2. Circular Queues
Data Structures through c++

No comments:

Post a Comment