stacks and queues circular queue when you insert new item in the queue in the queue workshop appletthe front arrow moves upwardtoward higher numbers in the array when you remove an itemrear also moves upward try these operations with the workshop applet to convince yourself it' true you may find the arrangement counter-intuitivebecause the people in line at the movies all move forwardtoward the frontwhen person leaves the line we could move all the items in queue whenever we deleted onebut that wouldn' be very efficient insteadwe keep all the items in the same place and move the front and rear of the queue the trouble with this arrangement is that pretty soon the rear of the queue is at the end of the array (the highest indexeven if there are empty cells at the beginning of the arraybecause you've removed them with remyou still can' insert new item because rear can' go any further or can itthis situation is shown in figure maxsize- new itemwhere can it go front rear figure rear arrow at the end of the array wrapping around to avoid the problem of not being able to insert more items into the queue even when it' not fullthe front and rear arrows wrap around to the beginning of the array the result is circular queue (sometimes called ring bufferyou can see how wraparound works with the workshop applet insert enough items to bring the rear arrow to the top of the array (index remove some items from