Linear Search
Notation
Step by Step
- Sequentially check each item in the list
Pseudocode
a = list
n = size of list
t = target value
for (i = 0; i < n; i++)
if (a[i] == t)
return a[i]Video
a = list
n = size of list
t = target value
for (i = 0; i < n; i++)
if (a[i] == t)
return a[i]