Race sorting algorithms head-to-head and discover why Big O matters!
| Algorithm | Best | Average | Worst |
|---|---|---|---|
| Bubble Sort | O(n) | O(n²) | O(n²) |
| Selection Sort | O(n²) | O(n²) | O(n²) |
| Insertion Sort | O(n) | O(n²) | O(n²) |
| Merge Sort | O(n log n) | O(n log n) | O(n log n) |
| Quick Sort | O(n log n) | O(n log n) | O(n²) |
| Heap Sort | O(n log n) | O(n log n) | O(n log n) |
| Counting Sort | O(n+k) | O(n+k) | O(n+k) |
| Radix Sort | O(nk) | O(nk) | O(nk) |
With 100 elements: O(n²) does ~10,000 operations while O(n log n) does only ~700!
Start a race to see which algorithm wins and why!
You did something amazing!