摘要:
Implement the queue ADT using only stacks and the methods pop(), push() and empty() of the java.util.Stack class. In Stack, We pop the element on the top of stack. In queue, we "pop" the front element which is inserted in queue first. This is the only difference between these two structure. Now we can use pop() method in Stack to do deletion in Queue. 阅读全文
posted @ 2007-02-10 22:43 QT_pixy 阅读(898) 评论(2) 推荐(0)
浙公网安备 33010602011771号