What is a circular queue? Why is it better than a normal queue? Give some practical Examples of usage of circular queue.
Answered On : 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.
Answered On : 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.
Answered On : Mar 3rd, 2016
What is meant by hashing and explain its characteristics
Answered On : May 22nd, 2016
QUEUE insertion is at rear end and deletion at front end. What you have said is wrong at this point.
Answered On : Dec 3rd, 2016
Hashing means mapping key to the address using a hash function or table and has many methods like modulo division, mid square, etc
Copyright © 2025 GeekInterview.com | All Rights Reserved
Copyright © 2025 GeekInterview.com | All Rights Reserved