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...
分类:
其他好文 时间:
2015-07-10 15:04:57
阅读次数:
111
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 ...
分类:
其他好文 时间:
2015-07-10 00:11:40
阅读次数:
178
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...
分类:
其他好文 时间:
2015-07-09 19:38:18
阅读次数:
112
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...
分类:
其他好文 时间:
2015-07-09 19:29:34
阅读次数:
101
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...
分类:
其他好文 时间:
2015-07-09 19:23:39
阅读次数:
96
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
分类:
其他好文 时间:
2015-07-09 17:29:41
阅读次数:
106
Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INTpublic class Solution { //本题很多细节需要考虑: ...
分类:
其他好文 时间:
2015-07-09 00:11:06
阅读次数:
124
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:
其他好文 时间:
2015-07-08 22:25:13
阅读次数:
137
Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat...
分类:
其他好文 时间:
2015-07-08 22:16:04
阅读次数:
121
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:
其他好文 时间:
2015-07-08 20:24:43
阅读次数:
112