Chapter 3 Stacks and Queues - 3.5
Problem 3.5: Implement a MyQueue class which implements a queue using two stacks.
The word "two stacks" is a strong hint. I implemented my solution quickly.
The lesson: never stop thinking about optimization!!!
发布时间: 2012-08-09 15:59:21 作者: rapoo
Chapter 3 Stacks and Queues - 3.5
Problem 3.5: Implement a MyQueue class which implements a queue using two stacks.
The word "two stacks" is a strong hint. I implemented my solution quickly.
The lesson: never stop thinking about optimization!!!