知识卡片
二分查找每步舍弃半个候选区间
已排序数组中,将目标与当前区间中点比较,保留可能含目标的一半;候选区间每步缩半,最坏比较次数随输入规模按Θ(log n)增长。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第2章 算法入门 · 查看原书依据
The binary search algorithm repeats this procedure, halving the size of the remaining portion of the subarray each time.
参考来源
- 位置:《算法导论(第4版)》第2章《算法入门》(OEBPS/chapter002.xhtml,文本字符[55000,60000))。
- 结论依据:习题2.3-6说明每步排除一半候选区间,并要求证明最坏Θ(lg n)界;本卡的复杂度结论由减半过程推得。
- 原始内容:The binary search algorithm repeats this procedure, halving the size of the remaining portion of the subarray each time.