Quicksort for three ways of choosing pivots