折半查找原理图
2016-05-19 11:38:53 4 举报
折半查找
作者其他创作
大纲/内容
7
9
max变量跑到min变量之前,没得折半了
14
若key = 10
min = mid + 1(1)
min = 0
mid = (min + max) / 2(2)
3
5
10
mid = (min + max) / 2(1)
max = mid - 1(1)
max = arr.length - 1(5)
mid = (min + max) / 2(0)
min = mid + 1(3)
max = mid - 1(0)
若key = 4
若key = 5
0 条评论
下一页
为你推荐
查看更多