Interactive Algorithm Learning · with live C++

See algorithms think.
Read the C++ line-by-line.

Step through 60+ classic algorithms in real-time. Every animation is paired with the matching C++ STL implementation — and the currently-executing line lights up as you watch.

2
1
16
14
11
4
9
6
5
18
12
10
17
3
13
8
7
15
partition0/18 placed
CompareSwapSorted
◇0+AlgorithmsFrom bubble sort to A* — every classic, step-by-step.
⬡0CategoriesSorting, Searching, Graphs, DP, Strings, Trees & more.
◉0fpsAnimationsButtery smooth playback powered by Framer Motion.
⌘⌘C++ CodeIdiomatic C++ STL paired with synced line highlights.

Algorithm DNA

Tap any card for the key idea behind each algorithm family.

⟨⟩Sorting
bestO(n)
worstO(n²) – O(n log n)
paradigmComparison / Non-comparison
⌕Binary Search
bestO(1)
worstO(log n)
paradigmDivide & Conquer
⬡Graph BFS/DFS
bestO(V+E)
worstO(V+E)
paradigmGraph Traversal
◈Dijkstra
bestO(E log V)
worstO(E log V)
paradigmGreedy + Priority Queue
✦A* Search
bestO(b^d)
worstO(b^d)
paradigmHeuristic Search
⊞Dynamic Prog.
bestProblem-specific
worstO(n·m)
paradigmMemoization / Tabulation

Big-O Playground

Scroll on the chart to zoom · hover for exact values.

n max = 60
060opsn
O(1)O(log n)O(n)O(n log n)O(n²)

Explore by category

Ten sections, dozens of algorithms — every one with a synced C++ panel.

Live Sort Race

5 algorithms, same array — watch them race step-by-step.

slowfast
step 0/232
BubbleO(n²)
0%
InsertionO(n²)
0%
SelectionO(n²)
0%
QuickO(n log n)
0%
MergeO(n log n)
0%
Steps comparison
Bubble232 steps
Insertion172 steps
Selection170 steps
Quick74 steps
Merge70 steps

A* Pathfinding — Live 3D

Watch A* explore the grid, then trace the optimal path.

Searching…
Start ●End ◆Open setClosed setPathWall
drag to rotate
Heuristic
Manhattan
Complexity
O(b^d)
Optimal?
Yes (admissible h)

What you get

Designed to make algorithms click — not just watch them move.

▶

Step-by-step playback

Play, pause, step forward or back. Adjust speed at any time to slow down the tricky parts.

⌘

Live C++ STL code

Each visualization is paired with clean, well-commented C++ using STL you can read, copy, or download.

✦

Synced line highlighting

As the visualization runs, the matching line in the C++ source lights up so the algorithm makes sense.

⌗

Custom inputs

Type your own arrays, draw obstacles on pathfinding grids, and pick from sample graphs.

⏱

Complexity badges

Time and space complexity are shown next to every algorithm so trade-offs are obvious.

📱

Fully responsive

Looks and feels great on phone, tablet, laptop, monitor — code panel adapts to your screen.

Algorithm Spotlight

Auto-rotating — one classic algorithm at a time.

SPOTLIGHT · 01/7

Dijkstra

Shortest path on positively-weighted graphs · GPS, routers

How it works

Four steps from curious to confident.

01

Pick a category

Choose Sorting, Searching, Graphs, DP and more from the sidebar.

02

Pick an algorithm

Each category ships with multiple classic algorithms to compare side-by-side.

03

Press play

Watch it run. Step backwards, adjust speed, or jump frame-by-frame.

04

Read the code

The C++ panel highlights the line that is currently executing.

Complexity at a glance

How the algorithms stack up.

AlgorithmBestAverageWorstSpace
Bubble SortO(n)O(n²)O(n²)O(1)
Quick SortO(n log n)O(n log n)O(n²)O(log n)
Merge SortO(n log n)O(n log n)O(n log n)O(n)
Heap SortO(n log n)O(n log n)O(n log n)O(1)
Binary SearchO(1)O(log n)O(log n)O(1)
BFS / DFSO(V+E)O(V+E)O(V+E)O(V)
DijkstraO(E log V)O(E log V)O(E log V)O(V)
Bellman-FordO(VE)O(VE)O(VE)O(V)
Floyd-WarshallO(V³)O(V³)O(V³)O(V²)

Everything covered

A peek at the algorithms waiting for you.

Quick SortMerge SortHeap SortRadix SortCounting SortBinary SearchJump SearchInterpolation SearchBFSDFSDijkstraA*Bellman-FordFloyd-WarshallPrim MSTKruskal MSTKMPRabin-KarpZ-AlgorithmBoyer-MooreManacherSieveGCDFast PowerFenwick TreeSegment TreeFibonacci DPKnapsackLCSEdit DistanceCoin ChangeLISMatrix ChainRod CuttingQuick SortMerge SortHeap SortRadix SortCounting SortBinary SearchJump SearchInterpolation SearchBFSDFSDijkstraA*Bellman-FordFloyd-WarshallPrim MSTKruskal MSTKMPRabin-KarpZ-AlgorithmBoyer-MooreManacherSieveGCDFast PowerFenwick TreeSegment TreeFibonacci DPKnapsackLCSEdit DistanceCoin ChangeLISMatrix ChainRod Cutting

Pseudocode in motion

Watch Quick Sort step through its own code.

function quickSort(a, lo, hi):◀ Entry point
if lo >= hi: return
pivot = a[hi]
i = lo - 1
for j = lo to hi - 1:
if a[j] <= pivot: swap(a[++i], a[j])
swap(a[i+1], a[hi])
quickSort(a, lo, i); quickSort(a, i+2, hi)

Built with

Modern tooling for a snappy experience.

TanStack StartReact 19TypeScriptTailwind CSSFramer MotionThree.jsViteC++ STL

A short history

The minds behind the algorithms you're learning.

1945Merge Sort— von Neumann
1956Minimum spanning tree— Kruskal
1959Shortest path algorithm— Dijkstra
1960Quick Sort— Hoare
1962Floyd-Warshall— Floyd
1968A* Search— Hart/Nilsson/Raphael
1977KMP string search— Knuth/Morris/Pratt

Did you know?

Six surprising facts about the algorithms you use every day.

Speed

Binary search beats linear search by 1,000,000×

On a sorted list of 1B items, linear search takes ~1B steps. Binary search takes ~30. That's the power of O(log n).

01 / 06
♟ Game Theory

Strategy algorithms, animated

Six animated strategy algorithms — each with synced Python code and an explanation.

Open Game Theory →

Play the Prisoner's Dilemma

Pick a choice for each prisoner and watch the payoff. Years in prison — lower is better.

B: Silent
B: Confess
A: Silent
1 / 1
5 / 0
A: Confess
0 / 5
3 / 3
Prisoner A
Prisoner B

Strategy showdown

A round-robin Iterated Prisoner's Dilemma — the simple, forgiving Tit-for-Tat tends to come out on top.

Tit-for-Tat
0
Always Defect
0
Grudger
0
Always Cooperate
0
Random
0

Ready to see your first algorithm?

Bubble sort is a great place to start. Then graduate to graphs and DP when you're hooked.