
Stack&Queue
文章平均质量分 66
pengweixuan008
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
232.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() -- Get the front element.emp原创 2015-07-28 14:15:55 · 203 阅读 · 0 评论 -
225.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() -- Get the top element.empty() -- Retu原创 2015-07-28 15:14:46 · 300 阅读 · 0 评论 -
155.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 the stack.top() -- Get原创 2015-07-30 14:32:46 · 309 阅读 · 0 评论 -
20.Valid Parentheses (括号匹配)
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are all va原创 2015-08-03 14:38:58 · 389 阅读 · 0 评论