![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
SW_LCC
这个作者很懒,什么都没留下…
展开
-
二分查找
def binary_search (sort_list,item) : length = len(sort_list) low = 0; high = length -1 while low<=high : mid = (high-low) // 2 current_item = sort_list[...原创 2020-01-17 19:00:53 · 228 阅读 · 0 评论 -
快速排序
python实现def quick_sort(collection): length = len(collection) if length<=1 : return collection else: pivot = collection.pop() greater,lesser = [] ,[] f...原创 2020-01-16 14:20:37 · 115 阅读 · 0 评论 -
选择排序
python实现:def selection_sort(collection): length = len(collection) for i in range(length-1): least = i; for k in range(i+1,length): if collection[k] < collectio...原创 2020-01-16 09:46:46 · 108 阅读 · 0 评论