See every step the algorithm takes.
Stepwise executes the real code and redraws the structure after every operation. Pause anywhere, step backward, change the input — and watch the mechanism instead of memorizing the result.
4 tiers · 8 structures · nothing pre-recorded
Bubble Sort
bubble-sort.tsstep 01 / 291
function bubbleSort(a) {2
for (let n = a.length; n > 1; n--) {3
for (let j = 0; j < n - 1; j++) {4
if (a[j] > a[j + 1]) {5
swap(a, j, j + 1);6
}7
}8
// a[n - 1] is now in place9
}10
return a;11
}Start — every element is unsorted. Bubble the largest to the end each pass.
Every structure, drawn as itself
Eight worlds to explore
No generic bars. A tree branches, a list chains, a graph webs — each with its own bespoke, beautiful visualization you can step through at your own pace.
Prefer to wander? See how every structure connects.
Explore the map