Vidyalelo
Data Structure · Q6

Queues in Data Structures

Programming · Data Structure · question 6

Q6

How can you efficiently implement a queue using two stacks?

A.
By using one stack for enqueue and the other for dequeue
Answer
B.
By using one stack to store elements and the other to reverse them
C.
By alternating between two stacks
D.
By using two stacks for different operations

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board