Explaining quicksort