queues the term queue is commonly defined to be line of people waiting to be served like those you would encounter at many business establishments each person is served based on their position within the queue thusthe next person to be served is the first in line as more people arrivethey enter the queue at the back and wait their turn queue structure is well suited for problems in computer science that require data to be processed in the order in which it was received some common examples include computer simulationscpu process schedulingand shared printer management you are familiar with printer queue if you have used shared printer many people may want to use the printerbut only one thing can be printed at time instead of making people wait until the printer is not being used to print their documentmultiple documents can be submitted at the same time when document arrivesit is added to the end of the print queue as the printer becomes availablethe document at the front of the queue is removed and printed the queue adt queue is specialized list with limited number of operations in which items can only be added to one end and removed from the other queue is also known as first-infirst-out (fifolist consider figure which illustrates an abstract view of queue new items are inserted into queue at the back while existing items are removed from the front even though the illustration shows the individual itemsthey cannot be accessed directly the definition of the queue adt follows front back figure an abstract view of queue containing five items