快速排序Python版
答案 # coding: utf-8 def quick_sort(arr, low, high): # 继续排序的条件是low小于high if low < high: # 将数组分成左右两个区,并返回分区的位置 part_index = partition(arr, low, high) # 递归排序左边的数组 # 这里直接在arr上原地排序,所以不占用额外空间 quick_sort(arr, low, par…