上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit ... 阅读全文
posted @ 2015-03-04 14:20 imKirin 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Search Insert PositionGiven 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 ... 阅读全文
posted @ 2015-02-03 21:53 imKirin 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Swap Nodes in PairsGiven a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2-... 阅读全文
posted @ 2015-02-03 18:16 imKirin 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Multiply StringsGiven two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large ... 阅读全文
posted @ 2015-02-03 14:50 imKirin 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Permutation SequenceThe set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the fo... 阅读全文
posted @ 2015-02-02 14:26 imKirin 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Valid SudokuDetermine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are ... 阅读全文
posted @ 2015-01-29 15:28 imKirin 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Count and SayThe 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 r... 阅读全文
posted @ 2015-01-27 22:04 imKirin 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Decode WaysA message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded me... 阅读全文
posted @ 2015-01-26 18:51 imKirin 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Sqrt(x)Implementint sqrt(int x).Compute and return the square root ofx.分析:方案一:遍历0~n, 第一次出现i * i > n,返回 i-1即可。方案二:二分搜索: (1) 当n = 0, 或者 n = 1时,返回 n (2... 阅读全文
posted @ 2015-01-26 12:39 imKirin 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell Stock IISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the ... 阅读全文
posted @ 2015-01-25 17:52 imKirin 阅读(112) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 下一页