Question: ( 2 0 points ) Let A [ 1 . . n ] be an array of n possibly non - distinct integers. The array
points Let be an array of possibly nondistinct integers.
The array A may not be sorted. The th quantiles of are the
th smallest elements of A for dots, Note
that the th quantiles consist of elements of
For example, if the rd
quantiles of A are because the rd quantiles consist of the th and
th smallest elements of which are and respectively.
Suppose you have a black box worstcase lineartime algorithm that can
find the median of an array of integers. That is this algorithm runs in
time on an array of size Describe an algorithm that determines the
th quantiles of in time. Argure that your algorithm
is correct. Derive the running time of your algorithm.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
