时间:2021-07-01 10:21:17 帮助过:23人阅读
2.冒泡排序
>>> def mergesort(L):
if len(L) < 2:
return L
else:
middle = int(len(L)/2)
left = mergesort(L[:middle])
right = mergesort(L[middle:])
return merge(left, right)