[leetcode]Given a non-negative integer n representing the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0....
分类:
其他好文 时间:
2014-10-10 15:07:44
阅读次数:
167
1.telnet 10.10.24.106 11211 2.stats items STAT items:23:number 2 STAT items:23:age 934861 STAT items:23:evicted 0 STAT items:23:evicted_nonzero 0 STAT items:23:evicted_time 0 STAT items:23:outofmem...
分类:
系统相关 时间:
2014-10-10 13:38:54
阅读次数:
195
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.Brute Force的做法,N个点两两可以构成N(N-1)/2条线,我们可以找这N(N-1)/2条线...
分类:
其他好文 时间:
2014-10-10 10:39:54
阅读次数:
167
动手有益。输入一个表达式,没有括号,数字小于0-9之间,输出计算结果,所有的中间结果化为整形。例如: 输入:3+8×2/9-2 输出:2 /** * input a calculate string, calcuate the value * the number betw...
分类:
编程语言 时间:
2014-10-10 02:59:53
阅读次数:
269
给一个数组,其中只有一个数出现一次,其他的数都出现3次,请找出这个数。要求时间复杂度是O(n),空间复杂度O(1)。...
分类:
其他好文 时间:
2014-10-10 02:20:23
阅读次数:
177
Given 3 strings of only lowercase letter you have to count the number of ways you can construct the third string by combining two subsequences from the first two strings.
After deleting ...
分类:
其他好文 时间:
2014-10-10 02:06:23
阅读次数:
174
Problem DescriptionThere are 2 special dices on the table. On each face of the dice, a distinct number was written. Consider a1.a2,a3,a4,a5,a6 to be n...
分类:
其他好文 时间:
2014-10-10 00:22:52
阅读次数:
482
Reverse Nodes in k-GroupGiven a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a...
分类:
其他好文 时间:
2014-10-10 00:17:43
阅读次数:
355
Prime NumberTimeLimit:1 SecondMemoryLimit:32 MegabyteTotalsubmit:399Accepted:88DescriptionWe know that the number of prime numbers is countless. Now w...
分类:
其他好文 时间:
2014-10-09 23:06:21
阅读次数:
176
Two Sum Problem:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indic...
分类:
其他好文 时间:
2014-10-09 23:05:37
阅读次数:
273