python——數據結構之快速排序

def quick_sort(alist, start, end): """快速排序""" # 遞歸的退出條件 if start >= end: return # 設定起始元素爲要尋找位置的基準元素 mid = alist[start] # low爲序列左邊的由左向右移動的遊標 low = start # hi
相關文章
相關標籤/搜索