Searching
Finding values fast
Linear Search
Walks the array element by element until the target is found — works on any array, sorted or not.
Time O(n) · Space O(1)
Binary Search
Halves a sorted range each step by comparing the middle element with the target.
Time O(log n) · Space O(1)
Jump Search
On a sorted array, leaps ahead in fixed blocks of √n to find the block that may hold the target, then scans that block linearly.
Time O(√n) · Space O(1)
Interpolation Search
Estimates the probe position from the target's value relative to the window's endpoints — near O(log log n) on uniformly spread data.
Time O(log log n) · Space O(1)