算法导论上面快速排序的实现. 代码: def partition(array, left, right): i = left-1 for j in range(left, right): if array[j] <= array[right]: i += 1 array[j], array[i] = array[i], array[j] array[i+1], array[right] = array[right], array[i+1] return i+1 def quicksort(arr…