上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 26 下一页
摘要: Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu... 阅读全文
posted @ 2014-07-21 19:42 SunshineAtNoon 阅读(271) 评论(0) 推荐(0) 编辑
摘要: Write a function to find the longest common prefix string amongst an array of strings.题解:以strs[0]为模板,每次挨个查看是否所有的串里面是否第i位上都和strs[0]一样,如果都一样,把i位置上的字符放到a... 阅读全文
posted @ 2014-07-21 17:10 SunshineAtNoon 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu... 阅读全文
posted @ 2014-07-21 16:48 SunshineAtNoon 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu... 阅读全文
posted @ 2014-07-21 16:35 SunshineAtNoon 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2014-07-21 16:05 SunshineAtNoon 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Given a collection of integers that might contain duplicates,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.... 阅读全文
posted @ 2014-07-21 13:41 SunshineAtNoon 阅读(214) 评论(0) 推荐(0) 编辑
摘要: Given a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not co... 阅读全文
posted @ 2014-07-21 13:01 SunshineAtNoon 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2014-07-21 11:52 SunshineAtNoon 阅读(1480) 评论(0) 推荐(0) 编辑
摘要: Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i... 阅读全文
posted @ 2014-07-21 11:13 SunshineAtNoon 阅读(184) 评论(0) 推荐(0) 编辑
摘要: Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function to... 阅读全文
posted @ 2014-07-21 10:57 SunshineAtNoon 阅读(135) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 26 下一页