DAILYBRAINARC / Algorithm LabExplore all games ↗

INTERACTIVE COMPUTER SCIENCE · V0.805

Sorting Algorithm Studio

See every comparison and write. Understand the cost. Predict what happens next.

08real algorithms
one visual lab
NO SIGN-UP • WORKS OFFLINE
LIVE ALGORITHM TRACE

Bubble sort

O(n²) · stable
Select an algorithm and press play.
0comparisons
0writes
0swaps
0total steps
LEARN BY DOING

From the first swap to Big O.

Change the input to nearly sorted, reversed, or full of duplicates. Step through the same data with different algorithms, compare actual operations, and practice predicting the next transformation.

01ObserveStep-by-step, reversible operation trace
02CompareAll eight algorithms, one shared input
03Master32 challenge questions with explanations

Sorting algorithm FAQ

What do the bar colors mean?

Gold bars are being compared; coral bars were just modified; pale green bars are known to be in final positions. The highlighted indices come from the real algorithm execution trace.

Are these real algorithm implementations?

Yes. Every bar state, step and counter comes from actual sorting operations in the JavaScript implementation, including intermediate array writes during merges and insertions.

Do the counters measure actual performance?

They count comparisons, writes and swaps on the selected input. They do not measure runtime, because device performance and visualization frame rates would distort comparisons.

Does this work without an account?

Yes. It runs in your browser. Lesson progress is saved locally when browser storage is available; it is never sent to a server by this page.