Completed quicksort and comparison count