- 博客(29)
- 收藏
- 关注
原创 [leetcode oj 83]Remove Duplicates from Sorted List
Remove Duplicates from Sorted List
2016-01-11 14:38:13
229
原创 [leetcode oj 235]Lowest Common Ancestor of a Binary Search Tree
Lowest Common Ancestor of a Binary Search Tree
2016-01-10 16:04:44
209
原创 [leedcode oj 237]Delete Node in a Linked List
Delete Node in a Linked List
2016-01-07 14:49:52
223
原创 [leedcode oj 104]Maximum Depth of Binary Tree
Maximum Depth of Binary Tree
2016-01-07 14:37:09
264
原创 [leedcode oj 8]String to Integer (atoi)
Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca
2015-09-29 00:16:07
330
原创 [leedcode oj 125]Valid Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrome."race a car" is not a
2015-02-24 11:59:58
322
原创 [leedcode oj 6]ZigZag Conversion
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I
2015-02-17 12:02:06
279
原创 [leedcode oj 67]Add Binary
Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 一道二进制加法,思路还是很清晰的最开始的想法是这样的,先reverse,然后加,搞一个temp存进位,好像就行了吧。。。走起。。。试试class Solutio
2015-02-13 20:41:36
201
原创 [leedcode oj 38]Count and Say
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11.11 is read off as "two 1s" or 21.21 is read off as "one
2015-02-10 17:26:54
181
原创 [leedcode oj 14]Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.呵呵哒。。。前缀题。。。从来没会过。。。终于冤家路窄。。。要会了。。。辣么。。。想想吧。。。第一个想法是,两个两个比,然后搞一个tmp记录longest的值。。。但是好像复杂度太高了吧。。。然后呢。。。手贱百
2015-02-10 09:06:41
241
原创 [leedcode oj 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 b
2015-02-10 08:17:08
166
原创 [leedcode oj 58]Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is defi
2015-02-08 19:31:22
215
原创 [leedcode oj 13]Roman to Integer
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.一道罗马数字的题,以前只会十以内的。。。然后就。。。坑了。。。下面普及一下罗马数字的规则羅馬數字共有7個,即I(1)、V(5)、X(10)、L(50)、C(100)
2015-02-08 17:48:34
339
原创 [leetcode oj 171] Excel Sheet Column Number
Given a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 和168完全相同的思路,所以
2015-02-08 10:52:49
184
原创 [leetcode oj 168] Excel Sheet Column Title
Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB 作为一枚纯洁滴小白,第
2015-02-08 10:03:00
240
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人