1 2.5 快速排序问题 QuickSort l 由著名计算机科学家霍尔(C.A.R.Hoare)给出。 l 把原序列分成两个子问题,在被分成的两个子 问题以后不再需要归并。 l 被分成的两个子问题必须满足一子问题中的所 有元素都小于或等于另一子问题的任何一个元 素。2 QuickSort l Select a pivot (partitioning element) l Rearrange the list so that all the elements in the positions before the pivot are smaller than or equal to the pivot and those after the pivot are larger than the pivot l Exchange the pivot with the last element in the first (i.e., sublist) the pivot is now in its final position l Sort the two sublists3 2.5 快速排