数据结构学习(shell排序和归并排序)
摘要:
# coding=utf-8 # shell排序 # 参数alist:被被排序的列表 def shellsort(alist): gap = len(alist) / 2 while gap > 0: for i in range(gap): shellinsert(alist, i, gap) gap = ga... 阅读全文
posted @ 2016-11-05 19:47 cloud_wh 阅读(435) 评论(0) 推荐(0) 编辑