Sorting Algorithm Arena

Race 4 algorithms. See why O(n log n) crushes O(n^2).
Interactive companion to Issues 3 & 4
10x
30
Sound Off

Algorithm

Bubble Sort O(n^2)
Comparisons: 0 | Swaps: 0
Ready
Selection Sort O(n^2)
Comparisons: 0 | Swaps: 0
Ready
Merge Sort O(n log n)
Comparisons: 0 | Swaps: 0
Ready
Quick Sort O(n log n) avg
Comparisons: 0 | Swaps: 0
Ready
Algorithm Comparisons Swaps Status
Bubble Sort 0 0 Ready
Selection Sort 0 0 Ready
Merge Sort 0 0 Ready
Quick Sort 0 0 Ready

How They Compare

O(n^2) O(n log n)