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.

Level: beginnerTopic: Data structures algorithms

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.