← Back to Gallery

Algorithm Complexity

Visual comparison of time complexities and sorting races

Growth Rate Comparison
n = 10
1
ComplexityExample Algorithmn=1000 (est.)
O(1)Array index lookup~1 ns
O(log n)Binary search~10 ns
O(n)Linear search~1 μs
O(n log n)Merge sort~10 μs
O(n²)Bubble sort~1 ms
O(2ⁿ)Fibonacci (naïve)~10³⁰⁰ years
Sorting Algorithm Race
Bubble Sort
Quick Sort
Merge Sort
Each bar = one element. Highlighted = currently comparing/swapping.