摘要: Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Removes the element from in front 阅读全文
posted @ 2017-06-01 17:34 牛虻爱吃饭 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. to 阅读全文
posted @ 2017-06-01 17:28 牛虻爱吃饭 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov 阅读全文
posted @ 2017-06-01 17:20 牛虻爱吃饭 阅读(184) 评论(0) 推荐(0) 编辑