There is a well-known city (which will go nameless here) whose inhabitants have the reputation of enjoying a meal only if that meal is the best they have ever experienced in their life. Otherwise,...
Popular Questions - Uncategorized
Consider the following “justification” that the Fibonacci function, F(n) is O(n): Base case (n ≤ 2): F(1) = 1 and F(2) = 2. Induction step (n > 2): Assume claim true for n′ What is wrong with this...
1. Assuming it is possible to sort n numbers in O(nlogn) time, show that it is possible to solve the three-way set disjointness problem in O(nlogn) time.2. Describe an efficient algorithm for...
1. Give an example of a positive function f(n) such that f(n) is neither O(n) nor Ω(n).2. Show that 3. Show that
1. Determine the total number of grains of rice requested by the inventor of chess.2. Show that logb f(n) is Θ(log f(n)) if b > 1 is a constant.3. Describe an algorithm for finding both the minimum...
Bob built a website and gave the URL only to his n friends, which he numbered from 1 to n. He told friend number i that he/she can visit the website at most i times. Now Bob has a counter, C,...
Recent Comments