Algomination
Sorting
Searching
Data Structures
About
Contact
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.
Visualize
Random
7
2
9
4
5
1
8
Searching for 5 with Linear Search.
Play
Step 1 / 7
0.5×
1×
2×
4×
Comparing
Found