
Data structure
文章平均质量分 82
ljffdream
这个作者很懒,什么都没留下…
展开
-
[Leetcode]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() -- Ret转载 2015-06-18 17:45:46 · 482 阅读 · 0 评论 -
[Leetcode]Remove Linked List Elements
[题目]Remove all elements from a linked list of integers that have value val.ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 --> 3 --> 4 --> 5Credits:Special th原创 2015-07-01 09:41:30 · 329 阅读 · 0 评论 -
【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 from in front of queue.peek() -- Get the front elem转载 2015-07-20 22:20:09 · 336 阅读 · 0 评论