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 the stack.
top() – Get the t...
分类:
其他好文 时间:
2015-07-10 23:45:14
阅读次数:
157
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() –...
分类:
其他好文 时间:
2015-07-10 23:44:01
阅读次数:
153
题目:
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() -- Re...
分类:
编程语言 时间:
2015-07-09 14:41:27
阅读次数:
135
题目:
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 eleme...
分类:
编程语言 时间:
2015-07-09 14:40:55
阅读次数:
117
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.peek()...
分类:
其他好文 时间:
2015-07-08 22:37:27
阅读次数:
176
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-07-08 14:26:08
阅读次数:
123
Implement Queue using StacksImplement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes...
分类:
编程语言 时间:
2015-07-08 02:06:23
阅读次数:
143
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(...
分类:
其他好文 时间:
2015-07-07 22:55:28
阅读次数:
133
Implement Queue using StacksImplement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes...
分类:
其他好文 时间:
2015-07-07 22:30:22
阅读次数:
182
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-07-07 18:38:05
阅读次数:
120