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 o...
分类:
其他好文 时间:
2015-08-08 17:47:48
阅读次数:
134
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()...
分类:
其他好文 时间:
2015-08-08 14:54:53
阅读次数:
98
Problem DescriptionMr. B writes an addition equation such as 123+321=444 on the blackboard after class. Mr. G removes some of the digits and makes it ...
分类:
其他好文 时间:
2015-08-06 22:04:12
阅读次数:
135
Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
push(x) -- Push element x onto stack.pop() -- Removes the element on top of t...
分类:
其他好文 时间:
2015-08-04 19:12:16
阅读次数:
98
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()...
分类:
其他好文 时间:
2015-08-04 15:34:50
阅读次数:
96
class Stack {private: queue que;public: // Push element x onto stack. void push(int x) { que.push(x); } // Removes the eleme...
分类:
其他好文 时间:
2015-08-04 08:07:53
阅读次数:
113
Implement Queue using Stacks
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.pe...
分类:
其他好文 时间:
2015-08-03 19:14:35
阅读次数:
133
Implement Stack using Queues
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() -- ...
分类:
其他好文 时间:
2015-08-03 19:13:06
阅读次数:
150
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()...
分类:
其他好文 时间:
2015-08-02 21:24:47
阅读次数:
121
用栈实现队列
leetcode :
Implement Queue using Stacks
Implement the following operations of a queue using stacks.
push(x) -- Push element x to the back of queue.pop() -- Removes the element ...
分类:
其他好文 时间:
2015-08-02 16:53:21
阅读次数:
141