Binary Search Visualizer — Step-by-Step O(log n) Animation | Interview Prep Buddy
Back to Visualizers Hub
🔍

Searching Algorithms

Searching algorithms find the position of a target value within a collection of elements.

ALGORITHM PATTERN

Searching Algorithms1. Linear Search

🎯 Expected:Index 3 (Value 23 found)
Milestones:
step 1 / 11
Step Execution Canvas
12
[0]
i
▲
45
[1]
67
[2]
23
[3]
89
[4]
34
[5]
Concept Code
1for i from 0 to n - 1:
2 if arr[i] == target:
3 return i
4return -1
State
keyInsightScan unsorted elements sequentially from index 0 to N-1 in O(N) time.
target23
i0
arr[0]12
✏️
line 1💡 Key insight: Linear search sequentially inspects every element from index 0 to N-1 in O(N) time. Target = 23.