Question: Enqueue some numbers, then dequeue them, then enqueue some others as well. In the end, keep on dequeueing until the queue is empty. You should

Enqueue some numbers, then dequeue them, then enqueue some others as well. In the end, keep on dequeueing until the queue is empty. You should be printing out every operation of enqueue or dequeue: Ex: Enqueueing 5... Dequeueing 5... Enqueueing 11... Enqueueing 17.... Dequeueing 11.... Dequeueing 17.... Queue is empty
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
