⬅ Home About

Sorting Lab

Pick an algorithm, choose N ≤ 10,000, then play the simulation. Below you’ll find deep explanations, complexity table & chart, and code in C++ / Java / Python. A 16-element mini sim mirrors the chosen algorithm with clear, intuitive animations.

Controls

Simulation

Comparisons: 0
Swaps/Writes: 0
N: 128
Ready

Mini Simulation (16 elements)

Algo: Bubble
Ready

About: Bubble Sort

CaseTimeSpaceStable
C++
Java
Python
For huge N on O(n²) sorts, the big sim uses a fast preview. The mini sim is independent with its own speed and play/pause.