Labs / Computer Science

Sorting Algorithms

Forty bars, four classic ways to sort them. The highlighted pair is the one move the algorithm is making right now — press Play to let it run, or tap the canvas to step through by hand. Every algorithm gets the same shuffled deck until you reshuffle, so the compare and swap counters are a fair race.

Labs / Computer Science / Sorting Algorithms

Computer Science20–30 minFoundation

Sorting Algorithms

Forty bars, four classic ways to sort them. The highlighted pair is the one move the algorithm is making right now — press Play to let it run, or tap the canvas to step through by hand. Every algorithm gets the same shuffled deck until you reshuffle, so the compare and swap counters are a fair race.

Why it matters

Why explore this?

Computer science turns clear rules into reliable processes. This model lets you step through those rules and see how each decision changes the result.