摘要:
class StackWithTwoQueue { private Queue queue1 = new LinkedList(); private Queue queue2 = new LinkedList(); public synchronized void push(E e) { if (queue1.isEmpty()) { queue2.add(e); } else { queue1.add(e); } } public synchronized E pop() th... 阅读全文
posted @ 2013-07-25 16:18 钟悍 阅读(317) 评论(0) 推荐(0) 编辑