5120COMP: Algorithm Design A queue is a special kind of list, where items are inserted at one end (the rear) and deleted at the other end (the front). We shall use the following operations on queues. Enqueue(X): Inserts element X at the end of the queue. Dequeue(): Remove the fir
5120COMP: Algorithm Design A queue is a special kind of list, where items are inserted at one end (the rear) and deleted at the…