摘要: Question:Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element from i... 阅读全文
posted @ 2015-09-30 11:19 江湖小妞 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Queue接口与List、Set同一级别,都是继承了Collection接口。LinkedList实现了Queue接 口。Queue接口窄化了对LinkedList的方法的访问权限(即在方法中的参数类型如果是Queue时,就完全只能访问Queue接口所定义的方法 了,而不能直接访问 LinkedLi... 阅读全文
posted @ 2015-09-30 11:03 江湖小妞 阅读(506) 评论(0) 推荐(0) 编辑
摘要: Question:Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element from i... 阅读全文
posted @ 2015-09-30 10:38 江湖小妞 阅读(145) 评论(0) 推荐(0) 编辑