Order statistics: find max and min for 3n/2 compares, qsort based searching for i'th order statistic