Question: Prove that any comparison-based algorithm must make omega(n) comparisons to find the median of an array of n elements. hint: one possible way to solve
Prove that any comparison-based algorithm must make omega(n) comparisons to find the median of an array of n elements.
hint: one possible way to solve this problem is to assume that there is an algorithm that finds the median with o(n) comparisons and derives a contradiction.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
