A variant of quicksort which attempts to choose a pivot likely to represent the middle of the values to be sorted.