Queue with two stacks
Not only a theoretical exercise for amortize analysis, can be useful in practice as well.
Turing two physical stacks of T-shirts into a queue.
Not only a theoretical exercise for amortize analysis, can be useful in practice as well.
Turing two physical stacks of T-shirts into a queue.