Question: Write a recursive program to implement the median value find algorithm in I-D unsorted array A[n]: randomly choose an element A[i] and check its rank

Write a recursive program to implement the median value find algorithm in I-D unsorted array A[n]: randomly choose an element A[i] and check its rank r in A[n]. If r is the median, we are done. Otherwise, depending on the value of r, we then focus on the sub-array of A where the median element will occur and continue this procedure recursively. Justify the time complexity of your procedure
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
