Question: could you please solve it by divide-and-conquer? Exercise 2. THE NUMBER OF DIFFERENT VALUES IN A SET. We have a set of n numbers taking
Exercise 2. THE NUMBER OF DIFFERENT VALUES IN A SET. We have a set of n numbers taking only k different values, where the value of k is unknown. We have a binary comparison oracle at our disposal. Please explain how you can compute k using not more than n log2k + O(n) comparisons
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
