it means quick-select algorithm?
- by matin1234
Hi,
I have a question from my homework. I think my teacher needs an algorithm like quick select for this question is this correct?
The question:
Following a program (Subroutine) as a
"black box" is given (for example,
inside it is not clear and we do not
even inside it) with the worst case
linear time, can find the middle of n
elements. Using this black box, get a
simple linear algorithm that takes
input i and find the element which its
rank is equal to i (among the n
elements)
Thanks.