CIRCULAR QUEUE   :
Print this page
 

Primary operations defined for a circular queue are :                 

1. add_circular - It is used for addition of elements to the circular queue.
2. delete_circular It is used for deletion of elements from the queue.

We will see that in a circular queue , unlike static linear array implementation of the queue ; the memory is utilized more efficient in case of circular queue's.

The shortcoming of static linear that once rear points to n which is the max size of our array we cannot insert any more elements even if there is space in the queue is removed efficiently using a circular queue.

As in case of linear queue , we'll see that condition for zero elements still remains the same i.e.. rear=front

 

 
 
Prev