Algomination
Data Structures
AboutContact

Algomination

Learn algorithms and data structures through smooth, interactive visualizations.

SortingSearchingArray AlgorithmsData StructuresAboutContact

© 2026Algomination. Created by Omang Rawat & Rahul Soni.

Omang Rawat
Rahul Soni
All searching algorithms

Linear Search

Time O(n)Space O(1)

Scans the array left to right, comparing each element to the target until it's found.

7
2
9
4
5
1
8
Searching for 5 with Linear Search.
Step 1 / 7
ComparingFound

About Linear Search

Scans the array left to right, comparing each element to the target until it's found.

Time complexity: O(n). Space complexity: O(1).

How it works, step by step

Core idea — Check elements one by one from left to right until the target turns up.

What each pass accomplishes — Each step compares exactly one element to the target: a match ends the search, otherwise you move one position right. After k steps you know the target isn't in the first k elements.

Use the interactive visualizer above to run Linear Search on your own input and watch every comparison, swap, and operation animate step by step — pause, scrub, or replay at any speed.