What does the following recursive function do on a queue? Do(Q) { if…
What does the following recursive function do on a queue?
Do(Q)
{
if (!isEmpty(Q))
{
temp = dequeue(Q)
Do(Q)
enqueue(temp, Q)
}
}
- A.
Implementation of stack using queue
- B.
Reversing elements of queue
- C.
Printing elements of queue
- D.
Printing elements of queue in reverse without changing the queue contents
Attempted by 604 students.
Sign up free to check your answer
Sign up freeLoading lesson…