摘要:
Write a program to sort a stack in ascending order (with biggest items on top). You may use at most one additional stack to hold items, but you may no... 阅读全文
摘要:
Implement a MyQueue class which implements a queue using two stacks./*Use two stacks, when enqueue, first pop all the elements in stack2 on stack1, th... 阅读全文
摘要:
Imagine a (literal) stack of plates. If the stack gets too high, it might topple. Therefore, in real life, we would likely start a new stack when the ... 阅读全文