after dequeuewhich returns and makes the queue empty back front the extra code required to implement the wraparound is minimal (although it probably doubles the running timeif incrementing either back or front causes it to go past the arraythe value is reset to the first position in the array some programmers use different ways of representing the front and back of queue for instancesome do not use an entry to keep track of the sizebecause they rely on the base case that when the queue is emptyback front- the size is computed implicitly by comparing back and front this is very tricky way to gobecause there are some special casesso be very careful if you need to modify code written this way if the currentsize is not maintained as an explicit data memberthen the queue is full when there are thearray capacity()- elementssince only thearray capacity(different sizes can be differentiated and one of these is pick any style you like and make sure that all your routines are consistent since there are few options for implementationit is probably worth comment or two in the code if you don' use the currentsize data member in applications where you are sure that the number of enqueues is not larger than the capacity of the queuethe wraparound is not necessary as with stacksdequeues are rarely performed unless the calling routines are certain that the queue is not empty thus error checks are frequently skipped for this operationexcept in critical code this is generally not justifiablebecause the time savings that you are likely to achieve are minimal applications of queues there are many algorithms that use queues to give efficient running times several of these are found in graph theoryand we will discuss them in for nowwe will give some simple examples of queue usage when jobs are submitted to printerthey are arranged in order of arrival thusessentiallyjobs sent to printer are placed on queue virtually every real-life line is (supposed to bea queue for instancelines at ticket counters are queuesbecause service is first-come first-served another example concerns computer networks there are many network setups of personal computers in which the disk is attached to one machineknown as the file server users on other machines are given access to files on first-come first-served basisso the data structure is queue we say essentially because jobs can be killed this amounts to deletion from the middle of the queuewhich is violation of the strict definition