Adding pivot selection logics in quicksort