queues are used as programmer' tool as stacks are we'll see an example where queue helps search graph in they're also used to model real-world situations such as people waiting in line at bankairplanes waiting to take offor data packets waiting to be transmitted over the internet there are various queues quietly doing their job in your computer' (or the network'soperating system there' printer queue where print jobs wait for the printer to be available queue also stores keystroke data as you type at the keyboard this wayif you're using word processor but the computer is briefly doing something else when you hit keythe keystroke won' be lostit waits in the queue until the word processor has time to read it using queue guarantees the keystrokes stay in order until they can be processed the queue workshop applet start up the queue workshop applet you'll see queue with four items preinstalledas shown in figure this applet demonstrates queue based on an array this is common approachalthough linked lists are also commonly used to implement queues the two basic queue operations are inserting an itemwhich is placed at the rear of the queueand removing an itemwhich is taken from the front of the queue this is similar to person joining the rear of line of movie-goersandhaving arrived at the front of the line and purchased ticketremoving themselves from the front of the line the terms for insertion and removal in stack are fairly standardeveryone says push and pop standardization hasn' progressed this far with queues insert is also called put or add or enquewhile remove may be called delete figure the queue workshop applet