摘要:
1 def binary_search(sorted_list,value): 2 low = 0 3 high = len(sorted_list) - 1 4 while(low<high): 5 mid = (low + high) / 2 6 if(sorted_list[mid] == value): 7 return mid 8 elif(sorted_list[mid] > value): 9 high = mid - 110 else:11 ... 阅读全文
posted @ 2012-06-05 15:17 JustinYan 阅读(121) 评论(0) 推荐(0)
浙公网安备 33010602011771号