Design an algorithm to extract the subset of values in a randomly ordered array that are within a specific range. What we want is:
Modify the selection sort (algorithm 5.2) so that it sorts all values less than x. Varying x randomly, compare this algorithm with the partitioning algorithm.