Ch.2 · Level 05

顺序表按值查找

按值检索顺序表中的元素,扫描表结构定位元素位置。

arrow_back 返回关卡库

顺序表按值查找

初始数组:[8, 15, 23, 42, 16, 4]。准备查找目标值 42。点击运行,观察顺序扫描匹配的过程。

选择数据集
expand_more
哨兵模式 (Sentinel) 在尾部追加哨兵,省去越界检查分支
当前数据: [8, 15, 23, 42, 16, 4] ,寻找目标值: 42
⌘ + Enter to run
guest@aq-shell:~ (bash)
terminal
0 / 0