摘要: 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 of queue.peek() -- Get the front element.empty() --... 阅读全文
posted @ 2017-03-02 22:54 xiejunzhao 阅读(158) 评论(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.top() -- Get the top element.empty() -- Return whether ... 阅读全文
posted @ 2017-03-02 22:53 xiejunzhao 阅读(270) 评论(0) 推荐(0)