上一页 1 ··· 6 7 8 9 10 11 12 下一页
摘要: 题目:Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.For ex... 阅读全文
posted @ 2015-10-03 11:29 JSRGFJZ6 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 题目:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321思路:迭代计... 阅读全文
posted @ 2015-10-03 07:43 JSRGFJZ6 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [... 阅读全文
posted @ 2015-10-03 07:35 JSRGFJZ6 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 题目:Divide two integers without using multiplication, division and mod operator.思路:注意越界问题。比如: -2147... 阅读全文
posted @ 2015-10-02 12:46 JSRGFJZ6 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题目:Given two numbers represented as strings, return multiplication of the numbers as a string.思路:重... 阅读全文
posted @ 2015-10-02 09:34 JSRGFJZ6 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 题目:Implement pow(x, n).思路:递归首先把极限情况考虑,直接返回,接下来就是负指数的处理。最后考虑下指数是奇数还是偶数,递归调用。(注意,这种类型题目务必判断是否越界)代码:c... 阅读全文
posted @ 2015-10-02 07:35 JSRGFJZ6 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a non-negative number represented as an array of digits, plus one to the number.string1=“... 阅读全文
posted @ 2015-10-01 22:57 JSRGFJZ6 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 题目:给出一些非重叠区间,插入一个新区间有[1,3],[6,9], 插入 [2,5] 结果为 [1,5],[6,9].有[1,2],[3,5],[6,7],[8,10],[12,16], 插入 [... 阅读全文
posted @ 2015-10-01 20:40 JSRGFJZ6 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 题目:计算X均方根思路:二分法二分法不再累赘,只是想说的,程序的一个巧妙的地方在于,溢出的时候,他的开方值是46340,也就是说,我本程序最大的结果最大为46340,而我对应的那个原来的数最大只可... 阅读全文
posted @ 2015-09-28 21:41 JSRGFJZ6 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a sorted array of integers, find the starting and ending position of a given target value... 阅读全文
posted @ 2015-09-27 06:55 JSRGFJZ6 阅读(121) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 下一页