Linear Search Visualization

Step through a linear search algorithm one element at a time

Round 1/5
Searching for: --
Comparisons: 0
Best avg: --
Array

Pseudocode

function linearSearch(arr, target):
for i = 0 to arr.length - 1:
if arr[i] == target:
return i // Found!
// Move to next element
return -1 // Not found
600ms