全部博文(43)
发布时间:2013-01-03 20:32:06
Problem description:Please list all of the subsets of a known set including the empty set.My idea: one thinking of the algorithm backtracking is to generate a tree of subset and the condition of an element in the super set for a subset is either on or off.Hence we can specialize the subset tree to a......【阅读全文】
发布时间:2013-01-03 16:04:07
Problem description:When we calculate for prime numbers with a sieve method,we delete so many numbers which is not necessary repeatly.For instance,there is a number which consists of 3x7x17x23,and we delete it when we delete the multiples of 3 as we delete the same number when we delete the multiple......【阅读全文】
发布时间:2013-01-03 12:03:54
Problem description:Calculate the prime numbers with a sieve method.There is a magical sieve that can remove all the multiple of the number i.Please calculate the prime numbers at a range from 2 to N by this way.There is a requirement that you should not use multiplication and division.You can ......【阅读全文】