Search Algorithm Visualizer

Current Element
Compared
Found
Not Found
Search Key
Search Range
Pivot/Mid
Skipped

Array Visualization

Algorithm State

Current Index
-
Comparisons
0
Current Operation
Waiting to start...
Search Range
No active search

Memory State

Variables
target:
-
left/start:
-
right/end:
-
mid/current:
-
Algorithm Specific
No algorithm selected
-
Time & Space Complexity
Time Complexity:
-
Space Complexity:
-
Current Space:
-

Algorithm Code

// Select an algorithm to see its code

Algorithm Step

Select an algorithm and click visualize to see the explanation of each step.

Step 0 of 0

Search Results

Comparisons
0
Elements compared
Time Efficiency
O(n)
Worst-case time complexity
Space Usage
O(1)
Auxiliary space complexity

Search Summary

Algorithm Comparison

Algorithm Worst-Case Time Average-Case Time Best-Case Time Space Complexity Requirements
Linear Search O(n) O(n) O(1) O(1) None
Binary Search O(log n) O(log n) O(1) O(1) Sorted array
Jump Search O(√n) O(√n) O(1) O(1) Sorted array
Interpolation Search O(n) O(log log n) O(1) O(1) Sorted, uniformly distributed
Exponential Search O(log n) O(log n) O(1) O(1) Sorted array
Fibonacci Search O(log n) O(log n) O(1) O(1) Sorted array
Ternary Search O(log₃ n) O(log₃ n) O(1) O(1) Sorted array