Skip to content

Algorithms: Searching

Searching algorithms are procedures used to find the position of a target value within a collection (for example, an array or list). They are fundamental because searching is performed in many everyday programs — like looking up a name, a word, or a product.

Linear Search (Sequential)

Time:  O(n)
Space: O(1)
Works on: unsorted or sorted

Binary Search

Time:  O(log n)
Space: O(1)
Works on: sorted lists only

Interactive Linear & Binary Search

Check your understanding

Download a worksheet to test your understanding and strengthen your skills!

Browse Worksheets