Sort Sprint
Tap Swap or Keep. Desktop: Left arrow or S to swap, Right arrow or K to keep, Enter to continue.
What is Sort Sprint?
Sort Sprint is a free game where you become a sorting algorithm and make every comparison by hand. Two neighbouring bars light up and you decide whether they need swapping. Work along the row, then start again from the left, and you are running a bubble sort - watching the tallest remaining bar float to the end on each pass, which is exactly where the name comes from. At the end, bubble sort races merge sort on a long row of bars, and you see what each would cost on a thousand numbers - which is what algorithm efficiency actually means.
How to play Sort Sprint
Controls: Tap Swap or Keep. Desktop: Left arrow or S to swap, Right arrow or K to keep, Enter to continue.
- 1Two neighbouring glass bars sit under the spotlight. If the left one is taller, tap Swap. If not, tap Keep.
- 2Work along the row. Each full sweep is a pass, and the tallest loose bar ends up locked in gold at the right.
- 3When a whole pass makes no swaps, the row is sorted. That is bubble sort.
- 4Clear three rows (4, 5 and 6 bars), reading the lesson card after each one.
- 5Finish with the big race: predict whether bubble sort or merge sort finishes first on 40 bars, then watch the comparison counters.
Sort Sprint tips and strategy
- Only compare the two highlighted bars. It does not matter where they belong overall, just which of the two is taller.
- After each pass the locked section on the right grows by one, so every pass is shorter than the last. That is why the total is not simply the number of bars squared.
- Watch the largest bar specifically. Once the sweep reaches it, it gets carried all the way to the end in one pass, which is the behaviour the algorithm is named after.
- A finished sort still needs one clean pass with no swaps to prove it is sorted. That is real work an algorithm has to do too, not wasted effort.
Sort Sprint FAQ
What is bubble sort?
A sorting method that repeatedly walks through a list comparing neighbouring pairs and swapping any that are in the wrong order. Each full pass carries the largest remaining value to the end, like a bubble rising, and the list is sorted once a pass makes no swaps at all.
Why is bubble sort considered slow?
Because the work grows with the square of the list length. Ten items take about forty-five comparisons, but a thousand items take around half a million, and a million items would take five hundred billion. Methods like merge sort grow far more gently and are what real software uses.
What sorting algorithm do computers actually use?
Usually a hybrid. Most standard libraries use something built on merge sort or quicksort, often switching to a simple insertion sort for very short stretches because the simple method wins when there is almost nothing to do. Bubble sort is taught because it is easy to see, not because it is used.
Does playing this actually teach algorithms?
It teaches the two things that matter most at the start: that an algorithm is a precise sequence of small decisions anyone can follow, and that how many of those decisions it takes is a property worth caring about. Those are the foundations everything else in algorithms is built on.