QuickSort with 3 pivots