leetcode
文章平均质量分 64
七尺草民
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
leetcode---3.Pascal's Triangle II
问题描述: Given an index k, return the kth row of the Pascal’s triangle.For example, given k = 3, Return [1,3,3,1].Note: Could you optimize your algorithm to use only O(k) extra space? 帕斯卡三角即是杨辉三角。这个问题原创 2015-04-21 20:11:19 · 485 阅读 · 0 评论 -
leetcode---2.Reverse Bits
问题描述: Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary a原创 2015-04-21 19:51:11 · 570 阅读 · 0 评论 -
leetcode--TWO SUM延伸(假设答案不唯一、假设输入有相同数字)
leetcode中的TWO SUM对结果进行了限制,You may assume that each input would have exactly one solution. 但是考虑实际情况,有可能在数列中,有多个组合的sum等于target。需要找到所有的情况。 1, 假设:在输入的数列中没有重复的数字,结果中数对不唯一 sort之后不跳出循环,接着寻找对应的数对。直到寻找完 v原创 2015-07-14 21:29:56 · 1819 阅读 · 0 评论 -
leetcode---1.Two sum
Question: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 numbers such that they add up to the target,原创 2015-03-31 16:52:45 · 386 阅读 · 0 评论
分享