折半搜索算法(binary search)怎样找指定的数字

lyloog2022-10-04 11:39:541条回答

折半搜索算法(binary search)怎样找指定的数字
Explain in words, how the binary search algorithm is used to find a target in a list. Use the following list and target for your explanation. No coding is required.
List: 1 3 4 6 8 9 11
Target: 4

已提交,审核后显示!提交回复

共1条回复
jasondhx 共回答了19个问题 | 采纳率94.7%
他会找找到 集合中间的数字,与目标数字做比较 得到 6, 4小于6,定义新的集合,List 1,3,4, 找到3 ,4大于3,定义新的集合 List 4 就剩下最后一个4,。
1年前

相关推荐

大家在问