quicksort interface using middle pivot and xor