摘要:
必须要掌握“快速排序” 阅读全文
摘要:
# coding:utf-8 def merge_sort(alist): """歸幷排序""" n = len(alist) if n <= 1: return alist mid = n//2 # left 採用歸幷排序後形成的有序的新的列表 left_li = merge_sort(alist 阅读全文
摘要:
# coding:utf-8 def quick_sort(alist, first, last): """快速排序""" if first >= last: return mid_value = alist[first] low = first high = last while low < hi 阅读全文