二分查找数组中的某个特定数字

下面展示python代码 def binary_search(my_list, item): low = 0 high = len(my_list) - 1 while low <= high: mid = (low + high) // 2 guess = my_list[mid] if gues
posted @ 2023-11-06 17:09  YE-  阅读(6)  评论(0编辑  收藏  举报