Six sorts, visualized
Bar charts rearranging themselves one step at a time, with comparison and swap counts and progress always on screen. Pivots and settled elements get their own colors.
// ARURAKU — Algorithm Visualizer
Classic sorting, searching, and recursion algorithms, replayed one step at a time. Comparisons glow orange, swaps flash green. Watch bars trade places, a search spread through a maze, discs hop between pegs — and get a feel for why one algorithm is faster before you ever read the code.
Give the same array to two to four sorts at once and compare finish order plus comparison and swap counts. You see the gap between O(n²) and O(n log n) before you read a single number.
$ aruraku race quick merge insertion bubble \ --pattern random lane order status quick O(n log n) ✓ 1st merge O(n log n) ✓ 2nd insertion O(n²) running… bubble O(n²) running… $ aruraku race insertion quick \ --pattern nearly-sorted insertion O(n²) ✓ 1st # fast when nearly sorted quick O(n log n) ✓ 2nd
Don't read it — run it. Pause, step forward, change the input, run it again.
Bar charts rearranging themselves one step at a time, with comparison and swap counts and progress always on screen. Pivots and settled elements get their own colors.
BFS, DFS, Dijkstra's algorithm, and A* explore a grid maze. BFS spreads in even rings; A* leans toward the goal. Tap to edit walls, or generate a new maze.
Follow the minimum 2ⁿ−1 moves with 3 to 8 discs. Raise the depth of the Koch curve, Sierpinski triangle, and recursive tree to watch the same shape nest inside itself.
Slow it down with the speed slider, or pause and advance one move at a time to see exactly what was compared and what was swapped.
Tap ⓘ for how it works, its complexity, where it's used in practice, and its strengths and weaknesses — then flip back to the animation.
Animation screens never show ads. Banners sit only at the bottom of menu screens, and full-screen ads appear only at breaks such as switching areas. Every learning feature is free.
$ legend
The classics that show up in CS courses and IT certification exams.
| Area | Algorithm | Avg. complexity | What to watch |
|---|---|---|---|
| Sort | Bubble Sort | O(n²) | Neighbors compare and swap; large values bubble to the right |
| Sort | Selection Sort | O(n²) | Find the minimum of the rest and move it forward; few swaps |
| Sort | Insertion Sort | O(n²) | Very fast on nearly sorted input |
| Sort | Merge Sort | O(n log n) | Split, then merge in order; stable |
| Sort | Quick Sort | O(n log n) | Partition left and right around a pivot |
| Sort | Heap Sort | O(n log n) | Build a heap, then settle the maximum at the end |
| Search | Breadth-first search (BFS) | O(V+E) | Spreads in even rings; guarantees the shortest path |
| Search | Depth-first search (DFS) | O(V+E) | Pushes as far as it can, backtracks at dead ends |
| Search | Dijkstra's algorithm | O(E log V) | Settles nodes in order of cost to find shortest paths |
| Search | A* | — | Uses a heuristic to favor the direction of the goal |
| Recursion | Tower of Hanoi | O(2ⁿ) | n discs take at least 2ⁿ−1 moves |
| Recursion | Koch curve / Sierpinski triangle / recursive tree | — | Each extra level nests the same shape again |