摘要:
插入排序法 def insert(data): for i in range(1, len(data)): tmp = data[i] j = i 1 while j = 0 and tmp 阅读全文
摘要:
快速排序的两种方法 @cal_time def choose(data): for i in range(len(data) 1): for j in range(i+1, len(data)): if data[j] choose2比choose要快 阅读全文
摘要:
![](http://images2015.cnblogs.com/blog/720785/201703/720785-20170309170702844-2039602058.png) ```
def bubble(li): tag = 0 for i in range(len(li)-1): for j in range(len(li)-i-1): ... 阅读全文
摘要:
``` def bin_search(data,val): high = len(data) 1 low = 0 while low val: high = mid 1 else: if data[mid] 阅读全文