第一个快排代码有点bug,
less_than_pivot = [x for x in array if x <= pivot]
more_than_pivot = [x for x in array if x > pivot]
改为:
less_than_pivot = [x for x in array[1:] if x <= pivot]
more_than_pivot = [x for x in array[1:] if x > pivot]
IP属地:北京