The code base version is an integer and start from 1 to n. One day, someone commit a bad version in the code case, so it caused itself and the followi...
分类:
其他好文 时间:
2015-02-07 06:50:47
阅读次数:
118
Given number n. Print number from 1 to n. But:when number is divided by 3, print fizz;when number is divided by 5, print buzz;when number is divided b...
分类:
其他好文 时间:
2015-02-07 06:50:25
阅读次数:
133
There is an integer array which has the following features: * The numbers in adjacent positions are different. * A[0] A[A.length - 1].We define...
分类:
其他好文 时间:
2015-02-06 14:36:58
阅读次数:
160
Calculate the an % b where a, b and n are all 32bit integers.ExampleFor 231 % 3 = 2For 1001000 % 1000 = 0ChallengeO(logn)数学问题,要求O(log n)的时间复杂度,也就是每次去掉...
分类:
其他好文 时间:
2015-02-06 13:12:25
阅读次数:
170
Given string A representative a positive integer which has N digits, remove any k digits of the number, the remaining digits are arranged according to...
分类:
其他好文 时间:
2015-02-06 07:03:23
阅读次数:
161
Count the number of k's between 0 and n. k can be 0 - 9.Exampleif n=12, in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], we have FIVE 1's (1, 10, 11, 12...
分类:
其他好文 时间:
2015-02-05 13:22:53
阅读次数:
127
Given a (decimal - e g 3.72) number that is passed in as a string,return the binary representation that is passed in as a string.If the number can no....
分类:
其他好文 时间:
2015-02-05 07:03:58
阅读次数:
147
Compare two strings A and B, determine whether A contains all of the characters in B.The characters in string A and B are all Upper Case letters.Examp...
分类:
其他好文 时间:
2015-02-05 07:03:49
阅读次数:
311
Binary search is a famous question in algorithm.For a given sorted array (ascending order) and a target number, find the first index of this number in...
分类:
其他好文 时间:
2015-02-05 07:02:22
阅读次数:
91
Given n items with size A[i] and value V[i], and a backpack with size m. What's the maximum value can you put into the backpack?NoteYou cannot divide ...
分类:
其他好文 时间:
2015-02-04 16:11:44
阅读次数:
155