python快速排序
def quicksort(nums,start,end):
if start > end:
return
low,high = start,end
pivot = nums[low]
while low < high:
while low < high and nums[high] >= pivot:
high -= 1
nums[low] = nums[high]
while low < high and nums[low] >= pivot:
low += 1
nums[high] = nums[low]
nums[low] = pivot
quicksort(nums,start,low-1)
quicksort(nums,low+1,end)