Warning: Undefined variable $case in /mnt/H1/luoweihua.cn/wp-content/themes/niRvana/custom_function.php on line 110
Warning: Undefined variable $case in /mnt/H1/luoweihua.cn/wp-content/themes/niRvana/custom_function.php on line 110
Warning: Undefined variable $case in /mnt/H1/luoweihua.cn/wp-content/themes/niRvana/custom_function.php on line 110
[上]JAVA学习系列模块九第四章184.数组常见算法_二分查找分析
视频
笔记
3.二分查找
1.前提:数组中的数据必须是有序的
2.查询思想:
a.老式查询:遍历数组,一个一个比较 -> 查询效率慢
b.二分查找:每次找中间索引对应的元素进行比较查询(每一次查询少一半数据)
![[上]JAVA学习系列模块九第四章184.数组常见算法_二分查找分析 [上]JAVA学习系列模块九第四章184.数组常见算法_二分查找分析](https://res.luoweihua.cn/wp-content/uploads/2024/06/2024061403290677.webp)