queues define queue adt queue is data structure that linear collection of items in which access is restricted to first-in first-out basis new items are inserted at the back and existing items are removed from the front the items are maintained in the order in which they are added to the structure queue()creates new empty queuewhich is queue containing no items isempty()returns boolean value indicating whether the queue is empty length ()returns the number of items currently in the queue enqueueitem )adds the given item to the back of the queue dequeue()removes and returns the front item from the queue an item cannot be dequeued from an empty queue using the formal definition of the queue adtwe can now examine the code necessary to create the queue in figure queue( enqueue enqueue enqueue enqueue enqueue after creating queue objectwe simply enqueue the five values in the order as they appear in the queue we can then remove the values or add additional values to the queue figure illustrates the result of performing several additional operations on the sample queue implementing the queue since the queue data structure is simply specialized listit is commonly implemented using some type of list structure there are three common approaches to implementing queueusing vectora linked listor an array in the following sectionswe examine and compare these three approaches using python list the simplest way to implement the queue adt is to use python' list it provides the necessary routines for adding and removing items at the respective ends by applying these routineswe can remove items from the front of the list and append new items to the end to use list for the queue adtthe constructor must define single data field to store the list that is initially empty we can test for an