Learn algorithmsby watching them work
A roadmap for programmers, one step at a time. Every lesson explains the idea with illustrations, then lets you play the algorithm on your own input, check yourself, and practise on real problems.
Five ways into each algorithm
Reading alone is not enough and animations alone are not either. Each topic walks you through the same five steps.
Learn
A short illustrated explanation: the intuition first, then the mechanics and the cost.
Watch
For lecture topics, a narrated explainer video that follows the lecture slide by slide.
Play
Step through the algorithm forwards and backwards. Then run it on your own input.
Check
Three quick questions that test whether the idea really landed.
Practice
Handpicked problems on CSES and LeetCode, easiest first.
This is BFS, running live
Every lesson has a visualizer like this one. Step forward and back, change the input, or let it play.
Graph (source: 4)
Queue (FIFO)
State
| v | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|
| d[] dist | ∞ | ∞ | ∞ | 0 | ∞ | ∞ | ∞ | ∞ | ∞ |
| p[] parent | ∞ | ∞ | ∞ | nil | ∞ | ∞ | ∞ | ∞ | ∞ |
| used[] | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
Pseudocode
1 q.push(s); used[s]=1; d[s]=0; p[s]=-1 2 while (!q.empty()) { 3 v = q.front(); q.pop() 4 for (u in adj[v]) { 5 if (!used[u]) { 6 used[u] = 1 7 d[u] = d[v]+1; p[u] = v 8 q.push(u) 9 } } } // d[] = shortest distances
The foundation
This roadmap stands on the university lectures of Zaza Gamezardashvili. The starred topics follow them closely: his examples, his order, his terminology. Everything else was built around them.
Each of these lectures is retold here as a narrated video, a classroom presentation and an interactive lesson.
★ Lectures by Zaza Gamezardashvili
Why Algo Visualized exists
I am a fan of Zaza Gamezardashvili's lectures. He explains algorithms with rare clarity, and I wanted more people to be able to learn from him.
So I took them as the foundation and built something new on top: a modern, organised roadmap you can follow from start to finish, where every topic has a logical bridge to the next one, and every idea can be watched, played with and practised.
One clear order, from Big-O to P vs NP
Each stage depends only on the stages before it. Follow it top to bottom, or jump to what you need.
Foundations
Measure an algorithm before you write one
2 lessons1Arrays & Hashing
The two structures behind most real code
3 lessons2Sorting & Searching
Order the data, then find anything in O(log n)
6 lessons2 ★ lectures3Linear Structures
Stacks, queues and lists: discipline about who goes next
4 lessons1 ★ lecture4Complete Search
Try everything, cleverly: recursion that explores
2 lessons1 ★ lecture5Trees
Hierarchies that make search logarithmic
6 lessons4 ★ lectures6Graphs I: Traversal
Explore any network level by level or deep first
5 lessons2 ★ lectures7Greedy
Take the best move now, and prove it is safe
2 lessons1 ★ lecture8Graphs II: Weighted
Shortest paths and cheapest networks
4 lessons1 ★ lecture9Math Toolkit
Bits, primes and fast powers you will keep reaching for
3 lessons10Dynamic Programming
Solve each subproblem once, reuse it forever
9 lessons2 ★ lectures11Strings
Find a pattern in a text without wasted comparisons
3 lessons12Capstone: Hard Problems
Know when no fast algorithm is likely to exist
1 lessons+Electives
Advanced tools for contests and specialised work
4 lessonsYou can code. Now learn to think in algorithms.
- ✓You know one programming languageLoops, functions and arrays are enough. Pseudocode and C++ snippets are kept short.
- ✓You want the why, not only the howEach lesson shows why the algorithm is correct and what it costs, not only what it does.
- ✓You learn by doingChange the input, step backwards, predict the next move, then solve real problems.
- ✓You read English or GeorgianSwitch language at any moment. Georgian uses the lectures' terminology.
Other great roadmaps
Learning works best when it fits you. These are the resources we compared our roadmap against, all excellent and free.
MIT 6.006
University course · videosIntroduction to Algorithms from MIT OpenCourseWare: lectures, notes and problem sets, with a strong proof focus.
Visit ↗USACO Guide
Competitive programmingA free, structured path from Bronze to Platinum with modules and curated problems for every topic.
Visit ↗CSES Handbook & Problem Set
Book + 300 problemsAntti Laaksonen's Competitive Programmer's Handbook and the classic problem set that goes with it.
Visit ↗NeetCode Roadmap
Interview preparationInterview patterns as a dependency graph, with the NeetCode 150 problem list and video solutions.
Visit ↗CP-Algorithms
ReferenceDetailed articles on hundreds of algorithms with proofs and implementations. The place to go deeper.
Visit ↗Algorithms by Jeff Erickson
Free textbookA clear, rigorous university textbook, free online. Superb chapters on recursion, backtracking and DP.
Visit ↗VisuAlgo
VisualizationsAnimated visualizations of classic data structures and algorithms from the National University of Singapore.
Visit ↗Tech Interview Handbook
Cheat sheetsCheat sheets for every topic: techniques, corner cases and the essential problems for coding interviews.
Visit ↗Start with Stage 0. Twelve minutes.
Big-O and recursion are all you need to begin. Your progress is saved in this browser.