AI engineering glossary · Data structures algorithms
What is linear search?
Linear search (also called sequential search): Finding a value by checking items one by one from the start until it is found or the list ends. It needs no ordering of the data but takes O(n) time.
Linear search: an example
Looking for a name in an unsorted list of 500 names may need up to 500 comparisons.
Related terms
More Data structures algorithms terms
- Linked list
- Load factor
- Longest common subsequence
- Longest increasing subsequence
- LRU cache
- Master theorem
- Memoization
- Merge sort
Where you learn it
Linear search is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.