Big O Complexity Quiz

Test your understanding of algorithm time and space complexity

Settings

Big O Complexity Reference

Complexity
Name
Example
O(1)
Constant
Array access, hash table lookup
O(log n)
Logarithmic
Binary search
O(n)
Linear
Linear search, single loop
O(n log n)
Linearithmic
Merge sort, quicksort (average)
O(n²)
Quadratic
Nested loops, bubble sort
O(n³)
Cubic
Triple nested loops
O(2ⁿ)
Exponential
Fibonacci (naive recursion)
O(n!)
Factorial
Generating all permutations