quicksort with difference list