Question: Consider comparison-based algorithms for finding the median element in an unsorted list of n elements. What is a lower bound for the number of comparisons
Consider comparison-based algorithms for finding the median element in an unsorted list of n elements. What is a lower bound for the number of comparisons required? Justify your lower bound. Suppose instead we decide that a purely comparison-based algorithm is not necessary. Our unsorted list contains integers in the range 0 to n^2 . Can you use Counting Sort or Radix Sort to find the median in O(n) time? Justify your answer. What algorithm is asymptotically faster than these two options?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
