See how different time complexities scale. Drag the slider to increase input size and watch some algorithms explode while others stay calm.
Designed with the WJEC specification in mindThe chart clips very large values at its top edge. Use the table for their values. Functions illustrate growth; they are not exact operation counts for every algorithm.
| Complexity | Operations | If 1μs each | Verdict |
|---|
| Algorithm | What it's like | Complexity |
|---|---|---|
| Array access | Opening a book to page 42 - you go straight there | O(1) - instant |
| Binary Search | Guessing a number - "higher or lower?" halves the options each time | O(log n) - very fast |
| Linear Search | Looking for your name in an unsorted list - check every single one | O(n) - depends on size |
| Merge Sort | Split in half, sort each half, merge back together | O(n log n) - fast |
| Bubble Sort | Sorting cards by swapping neighbours - very slow on big lists | O(n²) - slow |
| Fibonacci (naive) | Recalculates the same thing over and over - doubles the work each step | O(2ⁿ) - impossibly slow |