上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页
摘要: Given a sorted integer array without duplicates, return the summary of its ranges.For example, given[0,1,2,4,5,7], return["0->2","4->5","7"].Credits:S... 阅读全文
posted @ 2016-01-09 16:13 sdlwlxf 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Validate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the problem stat... 阅读全文
posted @ 2016-01-09 13:45 sdlwlxf 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ... 阅读全文
posted @ 2016-01-09 13:16 sdlwlxf 阅读(175) 评论(0) 推荐(0) 编辑
摘要: void mergeSort(int a[], int len){ int *temp = new int[len]; int gap = 1; while (gap len - 1 ? len : i + gap; int end = mid + gap ... 阅读全文
posted @ 2016-01-08 14:58 sdlwlxf 阅读(373) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at... 阅读全文
posted @ 2016-01-07 20:19 sdlwlxf 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".Subscribeto see which companies asked this ques... 阅读全文
posted @ 2016-01-07 19:59 sdlwlxf 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l... 阅读全文
posted @ 2016-01-06 21:58 sdlwlxf 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you optimize your algorithm to use onlyO(... 阅读全文
posted @ 2016-01-06 20:46 sdlwlxf 阅读(93) 评论(0) 推荐(0) 编辑
摘要: GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]... 阅读全文
posted @ 2016-01-06 20:07 sdlwlxf 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 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 fo... 阅读全文
posted @ 2016-01-05 22:07 sdlwlxf 阅读(137) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页