MYSIMULATOR
Interactive science collection← Explore all 20
Algorithms / Computational complexity

Sorting Lab: Algorithms under Pressure

Put classic sorting strategies through the same random array and compare their operations.

14
SIMULATION / 14LIVE
Interactive canvasTap the bars to scramble and restart the array
t = 0.0s

What you’re seeing

Put classic sorting strategies through the same random array and compare their operations. Drag the controls to investigate how the system changes, then pause to inspect the current state.

The scientific model

Bubble, insertion and selection sorts have different comparison and swap patterns, even though their average work is often O(n²).

Made with 🤖 ChatGPT