how do i find the number of items in a circular queue?
|front - rear| doesnt always work.
is there one equation to know how many element is in a cir
Assuming you are using array of size N for queue implementation, then size of queue would be size = (N-front + rear) mod N.
size = (N-front + rear) mod N