Suppose
integers are stored in an array
from
to
. Give
an efficient algorithm which finds the
th largest element among them.
Evaluate the average-case complexity of the algorithm in terms of
and
.
See [SED00] for a detailed answer.