EmbLogic's Blog

CO NDITION FOR QUEUE FULL AND EMPTY.

if we check for the condition that queue is full than we will give this  condition

if((front==0&&rear==SIZE-1)||(front==rear+1))//this condition will check the queue and print that queue will be full.

and for the empty queue

if(front==rear==-1)//this is the condition for checking that queue is empty

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>