Hi I have found these algorithms in the internet but I can not understand that why in the enqueue method we compare size with N-1??? please help me thanks!!
Algorithm size():
return (N-f+r)mod N
Algorithm enqueue(e):
if size()=N-1 then
throw a FullQueueException
Q[r]<---e
r<----(r+1)mod N