top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to find if a circular queue is full where as circular queue is implemented using array?

–1 vote
399 views

How to find if a circular queue is full where as circular queue is implemented using array? A sample code would be helpful?

posted Jul 20, 2016 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Hope you know the implementation of circular queue. You need to maintain a count, and increase the count when you insert an element into the circular queue and delete the count when you delete from the circular queue. you will be knowing the array size i.e. circular queue size. therefore u will know that the circular queue is full when the array is full.

if(count==arr_sz)
printf("\n circular queue is full\n");

answer Sep 24, 2016 by Sneha Maganahalli
...