02 2015 档案
Leetcode Count and Say
摘要:The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw... 阅读全文
posted @ 2015-02-26 22:51 Chris兔的小佳佳 阅读(194) 评论(0) 推荐(0)
Leetcode Roman to Integer
摘要:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.保存最典型的,1,5,10,等,然后如果左边的数比右边的小,则减去左边的数,否则相加pa... 阅读全文
posted @ 2015-02-25 21:15 Chris兔的小佳佳 阅读(80) 评论(0) 推荐(0)
Leetcode Integer to Roman
摘要:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.对于这道题,要把罗马数字中的几个特殊的数字保存到一张表中,如,4,5,9,10等,然后开... 阅读全文
posted @ 2015-02-24 12:56 Chris兔的小佳佳 阅读(163) 评论(0) 推荐(0)
Leetcode Valid Sudoku
摘要:Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with ... 阅读全文
posted @ 2015-02-03 22:54 Chris兔的小佳佳 阅读(118) 评论(0) 推荐(0)
Leetcode Search Insert Position
摘要:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or... 阅读全文
posted @ 2015-02-03 19:32 Chris兔的小佳佳 阅读(115) 评论(0) 推荐(0)
Leetcode Search for a Range
摘要:Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord... 阅读全文
posted @ 2015-02-02 22:14 Chris兔的小佳佳 阅读(126) 评论(0) 推荐(0)
Leetcode Search in Rotated Sorted Array
摘要:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are given a target value t... 阅读全文
posted @ 2015-02-02 14:33 Chris兔的小佳佳 阅读(113) 评论(0) 推荐(0)
Leetcode Longest Valid Parentheses
摘要:Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest... 阅读全文
posted @ 2015-02-02 13:24 Chris兔的小佳佳 阅读(96) 评论(0) 推荐(0)