Visualize & Master
Algorithms & Data Structures
Explore classic & modern sorting algorithms, efficient searching techniques, and interactive data structure visualizations — all with real-time step-by-step animation, comparisons, swaps, and Big-O metrics.
Linear Search
Select an algorithm, enter a target value, and click 'Search' to begin.
Select an algorithm to see recommended use cases.
Select an algorithm to see its history.
Searching Algorithm Catalog
6 algorithms in this category. Click any card for detailed analysis.
Linear Search
StableLinear Search is the simplest search method. It scans each element of the array sequentially until the target value is found or the entire array has been traversed.
Jump Search
StableJump Search is an improvement over Linear Search for sorted arrays. It jumps ahead by fixed-size blocks (√n) to find a range containing the target, then performs a linear scan within that block.
Ternary Search
StableTernary Search is a divide-and-conquer algorithm that splits the search interval into three equal parts and uses two midpoints to narrow down the target region. It is less efficient than Binary Search in practice despite the same asymptotic behavior.
Binary Search
StableBinary Search is an efficient algorithm for finding a target value in a sorted array by repeatedly dividing the search interval in half.
Exponential Search
StableExponential Search starts from index 1 and exponentially increases the bound (1, 2, 4, 8, …) until the bound exceeds the target or the array ends. It then performs a binary search within the identified range.
Interpolation Search
StableInterpolation Search improves on Binary Search by using the probe position formula based on the value distribution, assuming uniformly distributed sorted data. It estimates where the target might be rather than always bisecting the midpoint.
Complexity & Performance Tradeoffs
Side-by-side comparison of Big-O time and space complexity characteristics across searching algorithms.
| Algorithm | Best Time | Average Time | Worst Time | Space Complexity | Stability |
|---|---|---|---|---|---|
| Linear Search | O(1) | O(n) | O(n) | O(1) | Stable |
| Jump Search | O(1) | O(√n) | O(√n) | O(1) | Stable |
| Exponential Search | O(1) | O(log n) | O(log n) | O(1) | Stable |
| Interpolation Search | O(1) | O(log log n) | O(n) | O(1) | Stable |
| Ternary Search | O(1) | O(log₃ n) | O(log₃ n) | O(1) | Stable |
| Binary Search | O(1) | O(log n) | O(log n) | O(1) | Stable |
Binary, Exponential, and Ternary Search achieve O(log n) time by repeatedly halving (or partitioning) the search range.
Interpolation Search reaches O(log log n) average time on uniformly distributed data but degrades to O(n) worst-case.
All search algorithms operate in-place using O(1) auxiliary space since they only track pointer indices — no extra data structures needed.