摘要:
examination questionsUsing O(1) time to check whether an integer n is a power of 2.ExampleFor n=4, return true;For n=5, return false;ChallengeO(1) tim... 阅读全文
摘要:
examination questions Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth dist 阅读全文
摘要:
examination questions Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting wi 阅读全文
摘要:
examination questions Description: Count the number of prime numbers less than a non-negative number, n References: How Many Primes Are There? Sieve o 阅读全文