DSA · Reimagined
Searching intro time O(n) space O(1)

Linear Search

Look at every element in turn and compare it with the key. Simple, works on any array — sorted or not.

11
0
3
1
7
2
15
3
9
4
2
5
20
6

Scan left to right, looking for 15.

1 / 5

Practice

Machine twin: /dsa-viz-v2/linear-search.json — the full deterministic run as structured data.