// ARURAKU — Algorithm Visualizer

Algorithms make sense
when you see them move.

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.

v2.0 6 sorts / 4 searches / 4 recursion Free English / 日本語

ARURAKU race screen: four sorting algorithms sorting the same array at once

$ Race Mode — SORT RACE

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.

  1. 01Pick. Two to four of Bubble, Selection, Insertion, Merge, Quick, and Heap.
  2. 02Set the array. Random / nearly sorted / reversed / many duplicates, and the number of elements.
  3. 03Start. Every lane begins from the same array, with comparison and swap counters ticking up live.
  4. 04Read the result. Finish order and counts side by side. On a nearly sorted array Insertion Sort shines — the ranking changes with the input.
  aruraku race — example
$ 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

$ Features — FEATURES

Don't read it — run it. Pause, step forward, change the input, run it again.

SORT

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.

SEARCH

Pathfinding on a maze

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.

RECURSION

Tower of Hanoi and fractals

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.

STEP

Speed control and stepping

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.

INFO

An explanation for every algorithm

Tap ⓘ for how it works, its complexity, where it's used in practice, and its strengths and weaknesses — then flip back to the animation.

ADS

No ads during playback

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

idle compare swap pivot sorted

$ Algorithms — ALGORITHMS

The classics that show up in CS courses and IT certification exams.

AreaAlgorithmAvg. complexityWhat to watch
SortBubble SortO(n²)Neighbors compare and swap; large values bubble to the right
SortSelection SortO(n²)Find the minimum of the rest and move it forward; few swaps
SortInsertion SortO(n²)Very fast on nearly sorted input
SortMerge SortO(n log n)Split, then merge in order; stable
SortQuick SortO(n log n)Partition left and right around a pivot
SortHeap SortO(n log n)Build a heap, then settle the maximum at the end
SearchBreadth-first search (BFS)O(V+E)Spreads in even rings; guarantees the shortest path
SearchDepth-first search (DFS)O(V+E)Pushes as far as it can, backtracks at dead ends
SearchDijkstra's algorithmO(E log V)Settles nodes in order of cost to find shortest paths
SearchA*—Uses a heuristic to favor the direction of the goal
RecursionTower of HanoiO(2ⁿ)n discs take at least 2ⁿ−1 moves
RecursionKoch curve / Sierpinski triangle / recursive tree—Each extra level nests the same shape again

$ Who it's for — FOR

studentsAnyone just starting to learn programming
examPeople preparing for IT certification exams
engineersEngineers sharpening their feel for complexity
curiousAnyone who simply enjoys watching things move

$ Screenshots — GALLERY