What is the minimum number of stacks required to implement a queue?
- A One
- B Two
- C Three
- D Four
Explanation
A queue can be built from two stacks: one for enqueue operations and one for dequeue operations, with elements transferred between them.
What is the minimum number of stacks required to implement a queue?
A queue can be built from two stacks: one for enqueue operations and one for dequeue operations, with elements transferred between them.