Interactive visualization · education · Open source · MIT · live on Vercel · 2026
Press play and read the line that’s running.
54 data structures and algorithms, animated step by step, with the running line highlighted in C, Python or JavaScript.
Bubble Sort
SortingStarting bubble sort: compare neighbours, swap them if they are out of order.
- Unsorted
- Comparing
- Swapping
- Sorted
function bubbleSort(arr) { const n = arr.length; for (let i = 0; i < n - 1; i++) { for (let j = 0; j < n - i - 1; j++) { if (arr[j] > arr[j + 1]) { [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]]; } } } return arr;}- Time
- O(n) · O(n²) · O(n²)
- Space
- O(1)
- 54
- Visualizationsacross 6 categories
- 21
- Renderersshared by type
- 162
- ImplementationsC, Python and JavaScript for each
- 32
- Detail write-upsper-algorithm guides
Catalogue
54 entries, 21 renderers.
Adding an algorithm means one step generator and one registry entry; playback, code panel and controls come free.
Sorting
151 renderer
- Bubble
- Selection
- Insertion
- Merge
- Quick
- Heap
- Shell
- Counting
- Radix
- Bucket
- Cocktail Shaker
- Comb
- Gnome
- Pancake
- Cycle
Data Structures
117 renderers
- Array
- Linked List
- Stack
- Queue
- Deque
- Circular Queue
- Priority Queue
- Hash Table
- Heap
- Skip List
- Union-Find
Algorithms
118 renderers
- Recursion
- Hash Algorithm
- Greedy
- Divide & Conquer
- Backtracking
- Dynamic Programming
- String Matching
- KMP
- Rabin-Karp
- Sliding Window
- Two Pointers
Graph
83 renderers
- BFS
- DFS
- Graph
- Dijkstra
- Bellman-Ford
- Kruskal MST
- Prim's MST
- Topological Sort
Searching
71 renderer
- Linear
- Binary
- Jump
- Interpolation
- Exponential
- Ternary
- Fibonacci
Tree
22 renderers
- Binary Search Tree
- Trie
How it works
Record once, then replay the frames
Pick an algorithm, press play, and watch bars swap and nodes relax while the line doing the work lights up beside it.
Each algorithm runs once up front and records frames — state, highlights, a sentence, and a line number per language. Playback just moves an index, so stepping back is as cheap as forward.
Step-by-step playback
Play, pause, step, scrub or change speed — with keyboard shortcuts.
Code that follows along
Switch language mid-run and the highlight stays on the same step.
A sentence per step
Each frame explains itself in an aria-live region, so it is read aloud too.
Fresh inputs
New arrays, coin targets or board sizes, where the algorithm has something to vary.
Complexity guide
Big-O rules, a growth-rate table and per-algorithm write-ups.
From a registry entry to a highlighted line
A pick or fresh input (dashed) runs the generator once. After that, timer, buttons and keys only move one integer.
One frame, as bubble sort records it
steps.push({array: [21, 37, 43, 46, 12, 88, …], // a copy — later swaps must not reach backhighlights: { 3: 'swapping', 4: 'swapping' },description: '46 > 12 → swapping arr[3] and arr[4]',codeLines: { c: 5, python: 6, javascript: 6 }, // the same step, on each language's own line})Recorded just before a swap; each panel reads its own field.
The stack, layer by layer
Each band owns what sits inside it; arrows run in the direction work travels.
One run, from the sidebar to the highlighted line
One unit of work, from entry to the point someone reads the result.