👑 Premium Sign in Sign up

CSE08 · CSE foundations & data structures

Sorting Visualizer

Watch bubble, insertion, merge and quick sort race on the same bars, with comparisons and swaps counted.

📶 L100⏱ 25 min🧪 Live lab

🎯 You will learn to

  • Compare O(n²) and O(n log n) sorts
  • Count comparisons and swaps
  • See why input order matters

🧪 Live environment

Runs entirely in your browser: nothing is installed, no real cloud account is used and your code is never sent to our server.

Loading the lab…

✅ Steps & checkpoints

🗺️ Sorting race

Four algorithms sort copies of the same array while counters record comparisons and swaps.

Sorting raceFour algorithms sort copies of the same array while counters record comparisons and swaps.Same randomarrayBubbleO(n²)InsertionO(n²)MergeO(n log n)QuickO(n log n)Comparisons+ swapsFewestoperationscopycopycopycopyData storeComputeOperationsApp / UI

The 2D diagram shows the exact flow, ports and trust boundaries. The 3D scene is a concept view of the same parts; packets travel along the same arrows.

🤔 Think about it

Why is insertion sort fast on nearly sorted data?

🛡️ Safety & cost

Simulations and in-browser runtimes only.

🧹 Cleanup

Nothing to clean up.

📚 Reference documents

Official sources, checked on 5 Nov 2026. Cloud services change often; check the official page before relying on a feature. All references