Check in quicksort