Sorting, one swap at a time
Pick an algorithm and watch it work: blue is a comparison, pink a swap, orange a write. Every one comes with its rules, history and cost.
38algorithms
11families
11families
Bubble Sort
ExchangeSorted
0comparisons
0swaps
0writes
0array reads + writes
Race
Same array, same clock: every operation, including plain reads, costs one tick. Fewest ticks wins.
Winner
Winner
Library
Tap any algorithm to load it into the visualizer at the top.
No algorithms match that.
Compare
Every algorithm side by side. Sort the table by any column (yes, sorting the sorts). Tap a row to load it.