🏆 Races: 0
XP: 0

Algorithm Racing Arena

Race sorting algorithms head-to-head and discover why Big O matters!

50ms delay
Merge Sort O(n log n)
Comparisons: 0
Swaps: 0
🏆
Bubble Sort O(n²)
Comparisons: 0
Swaps: 0
🏆

📊 Complexity Comparison

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)

💡 Learning Insights

Why Big O Matters

With 100 elements: O(n²) does ~10,000 operations while O(n log n) does only ~700!

Race Results

Start a race to see which algorithm wins and why!

🏆 Session Leaderboard

🏆

Achievement Unlocked!

You did something amazing!

"Premature optimization is the root of all evil" - Donald Knuth
O(n log n) is the sweet spot for comparison-based sorting
Big O describes how algorithms scale, not absolute speed