queue supports two basic operations--enqueue and dequeue (if the queue is emptydequeue typically returns null or throws an exception elements are added (enqueuedand removed (dequeuedin first-infirst-out order the most recently inserted element is referred to as the tail or back elementand the item that was inserted least recently is referred to as the head or front element queue can be implemented using linked listin which case these operations have ( time complexity the queue api often includes other operationse method that returns the item at the head of the queue without removing ita method that returns the item at the tail of the queue without removing itetc dequeue (ainitial configuration (bqueue (aafter dequeue enqueue (cqueue (bafter enqueuing figure examples of enqueuing and dequeuing dequealso sometimes called double-ended queueis doubly linked list in which all insertions and deletions are from one of the two ends of the listi at the head or the tail an insertion to the front is commonly called pushand an insertion to the back is commonly called an inject deletion from the front is commonly called popand deletion from the back is commonly called an eject (different languages and libraries may have different nomenclature queues boot camp in the following programwe implement the basic queue api--enqueue and dequeue--as well as max-methodwhich returns the maximum element stored in the queue the basic idea is to use compositionadd private field that references library queue objectand forward existing methods (enqueue and dequeue in this caseto that object class queue def __init__ (self)self _data [def enqueue (self )self _data append (xdef dequeue (self)return self _data pop ( def max(self)return max(self _data the time complexity of enqueue and dequeue are the same as that of the library queuenamelyo( the time complexity of finding the maximum is ( )where is the number of entries