What is a circular queue? Why is it better than a normal queue? Give some practical Examples of usage of circular queue.

Showing Answers 1 - 2 of 2 Answers

payelmisty

  • Apr 11th, 2008
 

Circular queue is a bounded queue which implements arrays.

It is beter than a normal queue because in this we can effectively utilise the memory space.If we have a normal queue and have deleted some elements from there then empty space is created there and even if the queue has empty cells then also we cannot insert any new element because the insertion has to be done from one side only(i.e rear or tail) and deletion has to be done from another side(i.e front or head).But in case of circular queue the front and rear are adjacent to each other.

montaipuchu

  • Aug 27th, 2008
 

In case of a ordinary queue, the insertion take place from the front end and the deletion take place  from the rear end. In the case of deletion from the front end, the datas are deleted but the space of the queue is not utilized for the further storage. So this problem is solved in case of a circular queue. Even if the rear is full but there is space at the front end, then the data can be stored in the front end until the queue overflows.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account


 
Send   Reset

 

Related Answered Questions

 

Related Open Questions