
lintcode
betty1121
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
172. Remove Element
172. Remove ElementGiven an array and a value, remove all occurrences of that value in place and return the new length.The order of elements can be changed, and the elements after the new length don't...原创 2018-07-12 16:06:07 · 175 阅读 · 0 评论 -
leetcode: 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 valid bu...原创 2018-02-03 00:46:12 · 127 阅读 · 0 评论 -
495. Implement Stack
495. Implement StackImplement a stack. You can use any data structure inside a stack except stack itself to implement it.class Stack: """ @param: x: An integer @return: nothing """ ...原创 2018-07-13 09:22:55 · 203 阅读 · 0 评论 -
219. Insert Node in Sorted Linked List
Insert a node in a sorted linked list.ExampleGiven list = 1->4->6->8 and val = 5.Return 1->4->5->6->8.class Solution: """ @param head: The head of linked list. @param ...原创 2018-07-13 08:15:51 · 424 阅读 · 0 评论 -
225. Find Node in Linked List
Find a node with given value in a linked list. Return null if not exists.ExampleGiven 1->2->3 and value = 3, return the last node.Given 1->2->3 and value = 4, return null.class Solution: ...原创 2018-07-12 17:25:05 · 272 阅读 · 0 评论 -
483. Convert Linked List to Array List
Convert a linked list to an array list.ExampleGiven 1->2->3->null, return [1,2,3]class Solution: """ @param head: the head of linked list. @return: An integer list """ def...原创 2018-07-12 16:29:12 · 219 阅读 · 0 评论 -
521. Remove Duplicate Numbers in Array
Given an array of integers, remove the duplicate numbers in it.You should:Do it in place in the array.Move the unique numbers to the front of the array.Return the total number of the unique numbers.Ex...原创 2018-07-12 16:19:23 · 179 阅读 · 0 评论 -
415. Valid Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.Example"A man, a plan, a canal: Panama" is a palindrome."race a car" is not a palindrome.Ch...原创 2018-07-12 16:09:57 · 209 阅读 · 0 评论 -
53. Reverse Words in a String
Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".class Solution: """ @param: s: A string @return: A string """ ...原创 2018-07-12 16:07:40 · 156 阅读 · 0 评论 -
40. Implement Queue by Two Stacks
Description As the title described, you should only use two stacks to implement a queue's actions. The queue should support push(element), pop() and top() where pop is pop the first(a.k.a front) ele...转载 2018-09-15 13:55:47 · 183 阅读 · 0 评论