✦MYSIMULATOR · INTERACTIVE LABS
Algorithms · Interactive simulation

Sorting Algorithm Race

Race bubble, insertion and selection sort on the same data and compare operation counts.

ReadyREAL-TIME MODEL

What you are exploring

All three algorithms sort the same initial array but perform different sequences of comparisons and moves. Bubble, insertion and selection sort have quadratic worst-case time complexity, yet their behaviour differs on partially ordered data.

How to experiment
Change one parameter at a time, press Play, and compare the new behaviour. Press Reset to start a fresh run with your current settings.
Made with 🤖 ChatGPT