Changed quicksort to pick the middle element of an interval as the pivot