Added pivot selection by median to Quicksort