博主之前写过各种排序方法的详细分析,于是在这个地方直接放上示例代码
示例代码如下:
#encoding:utf-8
def quick_sort(lists,left,right):
# 快速排序
if left >= right:
return lists
key = lists[left]
low = left
high = right
while left < right:
while left
=key:
right = right-1
lists[left] = lists[right]
while left