MMYSIMULATOR LABS← All simulations
Interactive 2D simulation · Computer Science

Sorting Algorithm Race Visualizer

Compare sorting strategies as they rearrange a live array of values into ascending order.

LIVE MODEL
CANVAS · REAL-TIME
Explore · Adjust · Observe

The science

Sorting algorithms compare values and move them into order using different strategies. Bubble sort repeatedly swaps neighbours, insertion sort grows a sorted prefix, and selection sort repeatedly selects the smallest remaining value. The visualiser counts comparisons and swaps so you can compare their behaviour.

Made with 🤖 ChatGPT