快排+堆排序+桶排序

快速排序 分而治之思路,設置一個基準數,而後將數組分紅兩組,大於基準數和小於基準數。 def quick_sort(lis, i, j): if i > j: return temp = lis[i] l, r = i, j while l < r: while l < r and lis[r] >= temp:
相關文章
相關標籤/搜索