顺序查找(也称线性查找):一种在数据集合中按顺序逐个检查元素,直到找到目标值或检查完所有元素为止的查找方法。常用于未排序的数据;在最坏情况下需要检查全部元素。
/sɪˈkwenʃəl sɝːtʃ/
I used sequential search to find the missing file name in the list.
我用顺序查找在列表中找到缺失的文件名。
In an unsorted dataset, sequential search can be simpler to implement than binary search, but it may be much slower for large inputs.
在未排序的数据集中,顺序查找比二分查找更容易实现,但在输入规模很大时可能慢得多。
sequential 来自拉丁语 sequī(“跟随”),表示“按顺序的”;search 源自古法语 cerchier / chercher(“寻找、搜寻”)。合起来字面意思就是“按顺序去寻找”,对应算法上“从头到尾逐个比对”的思路。