What values are returned during the following sequence of queue operations, if
executed on an initially empty queue? enqueue(5), enqueue(3), dequeue(), enqueue(2),
enqueue(8), dequeue(), dequeue(), enqueue(9), enqueue(1), dequeue(), enqueue(7),
enqueue(6), dequeue(), dequeue(), enqueue(4), dequeue(), dequeue().
5 3 2 8 9 1 7 6
Comments
Leave a comment