GATE 2008
August 7, 2024Keys
August 9, 2024Data-Structures
|
Question 6
|
Consider the queues Q 1 containing four elements and Q 2 containing none (shown as the Initial State in the figure). The only operations allowed on these two queues are Enqueue(Q,element) and Dequeue(Q). The minimum number of Enqueue operations on Q 1 required to place the elements of Q 1 in Q 2 in reverse order (shown as the Final State in the figure) without using any additional storage is___________.
|
6
|
Question 6 Explanation:
Count Q1 enqueue


Correct Answer: A
Question 6 Explanation:
Count Q1 enqueue


