Completed quicksort with max possible swap count