Relation To Sorting

Certainly can solve this problem by sorting the list and looking at the GPA that ends up at the n/10 position.

But this does a great deal of extra work. Think about basing the algorithm on Quicksort...

algorithm123


next up previous
Next: Randomized Select Up: ORDER STATISTICS Previous: Class Rank Problem