Algorithm Visualizations for Interview Prep: Animated Explainers
Three ways to see an algorithm run before a coding interview: step through it in VisuAlgo, watch a narrated explainer, or code it in Manim. With an LRU cache example.
There are three ways to see an algorithm run before a coding interview: step through it yourself in an interactive visualizer, watch it explained in a narrated lesson, or code the animation. VisuAlgo and Python Tutor are the visualizers most people start with. Scrimba Explain, listed in ChatGPT as Explain Video Generator, turns a solution you worked out in the chat into a narrated lesson, with diagrams that play step by step and code slides that point at the line being explained. Manim is a Python library for coding the animation yourself, frame by frame.
Each one shows you an algorithm. None of them makes you write it, and that is what the interview asks for. The useful pattern is the same with all three: see the idea, predict what happens next, then close the tab and solve a problem from a blank file.
What Is Algorithm Visualization, and Does It Help?
Algorithm visualization is a picture of an algorithm's data changing step by step, and it helps most when you do something with it instead of only watching.
Computer science education research has a name for this. Naps and colleagues proposed six levels of engagement with a visualization: No Viewing, Viewing, Responding, Changing, Constructing and Presenting. Their hypothesis was that learning rises as you move up the levels. It built on a meta-analysis by Hundhausen and colleagues, which found that how students interact with a visualization has a significant impact on what they learn from it (Banerjee, Murthy and Iyer, 2015).
That 2015 paper tested the first step up. In a lecture on pointers, one group of first-year students predicted each step before the visualization showed it, and the other group watched with the instructor's commentary. 40% of the predicting group were observed actively engaged, against 11.67% of the watching group. Test scores only rose for the predicting students who had prior training in active learning, and the authors note that results across studies are mixed.
In practice, a visualization you only watch works like a textbook you only reread. Dunlosky's review of study techniques rated practice testing and distributed practice the most effective, and found that "rereading has inconsistent effects on student learning" (American Educator). Rewatching the same animation is rereading with motion. Pausing to guess the next step turns it into a small test.
Algorithm Visualization Tools Compared
The tools split by who drives: you click through a visualizer, a narrator walks you through an explainer, or you build the animation in code.
| Tool | What you see | What you control | Effort | Best for |
|---|---|---|---|---|
| VisuAlgo | Animated data structures with lecture slides and quizzes | Input values and each operation | Open a page | Learning the standard structures and checking yourself |
| Scrimba Explain | A narrated lesson with moving diagrams, code slides and animated scenes | The prompt, playback speed, which slide | One prompt | Hearing why a solution works, in order |
| Python Tutor | Your own code running line by line, with variables, pointers and stack frames | The code | Paste your code | Debugging recursion and pointer bugs in your solution |
| USFCA Data Structure Visualizations | One page per structure or algorithm, from sorting to Dijkstra | Input values and each operation | Open a page | Graph algorithms and dynamic programming tables |
| Algorithm Visualizer | Algorithms animated from their code | The code and its input | Pick from the menu or write code | Watching code and picture side by side |
| Manim | An animation you design and render to video | Everything | Write Python | Teaching others, or one idea you want to own |
Each tool as described on its own site, November 2026.
Interactive Visualizers: Step Through It Yourself
An interactive visualizer lets you choose the input and the operation and watch the structure change, which makes it the quickest way to practice the predict-then-check habit.
VisuAlgo is the one to open first. Associate Professor Steven Halim started it in 2011 for his students at the National University of Singapore, and it is offered at no cost (VisuAlgo). Each module covers one topic, from sorting and linked lists to hash tables, binary search trees, graph traversal and shortest paths. First-time visitors land in e-Lecture Mode, a guided set of slides. The Training button opens an online quiz whose questions are generated at random and graded on submission, so you can test yourself on, say, heap operations as often as you like.
Before you click Insert or Remove, say out loud where the pointers will end up, and only then run the step.

USFCA Data Structure Visualizations, David Galles's collection at the University of San Francisco, has a page for most interview staples: comparison sorts, heaps, tries, AVL and red-black trees, breadth-first and depth-first search, Dijkstra, Prim, Kruskal and topological sort (USFCA). Its dynamic programming pages fill in the table for Fibonacci, making change and longest common subsequence one cell at a time, which is the clearest way to see why a DP solution works.
Python Tutor shows your own code instead of a textbook version. It runs Python, Java, C, C++ or JavaScript step by step and draws variables, objects, pointers and stack frames, and its site names technical interview prep as one of its uses (Python Tutor). Paste the recursive solution that returns the wrong answer and watch the stack frames pile up.
Algorithm Visualizer animates algorithms from their code: pick one from the side menu and the code and the picture run together. The project is open source, with tracer libraries that turn code into visualization commands (Algorithm Visualizer).
Narrated Explainers: Watch the Idea Explained
A narrated explainer fits the moment after you have a solution, your own or an editorial's, and want the reasoning laid out in order.
That is the job of Scrimba Explain, which Scrimba makes. An explainer is a narrated lesson of typed slides (code, diagrams, animations) with a voice reading it out, built on the spot rather than recorded.
In ChatGPT it is the plugin Explain Video Generator. Work the problem through in the chat first, then type @, pick Explain Video Generator and ask for a lesson on the solution. The model you have been chatting with writes the lesson, so what it just worked out with you goes into it. The reply is a card; Watch explainer opens the lesson on scrimba.com, where the first slide appears within seconds and the rest builds while you watch.
What an algorithm lesson can hold:
- Diagrams that move. Explain draws flowcharts, sequence, state and class diagrams, and in new explainers they play step by step as the narration reaches each part.
- Code slides with a pointer. Real, highlighted code, about 15 lines a slide, with a pointer on the identifier or line the narration is discussing. A longer solution is taught across several slides.
- The math, when you ask. Name a recurrence such as merge sort's T(n) = 2T(n/2) + n and ask for the derivation: the formula renders as real notation and the steps are walked line by line.
- Animated scenes. For quantitative or spatial ideas, short scenes drawn with shapes, arrows, labels and graphs, timed to the narration.

The research above favors responding over watching, and Explain can do that too. On scrimba.com/explain you can ask for a quiz instead of a lesson ("quiz me on LRU caches"): five questions unless you name a number, from the basics to harder ones, and the narration waits on each question until you pick the right answer.
Making explainers through ChatGPT is not capped. A free Scrimba account keeps five of them, and with your Scrimba account connected in ChatGPT, each one counts toward that as it is made.
In the player, playback runs from 0.8x to 2.5x and the timeline has one segment per slide, so you can jump straight back to the step you missed. For code slides on a real change rather than a puzzle, see how to explain a pull request to your team.
Animation Code: Build It in Manim
Manim is for when you want to design the animation yourself, frame by frame, and are willing to write Python for it.
The Manim Community describes it as "a community maintained Python library for creating mathematical animations". It is free and open source under the MIT license, and Grant Sanderson wrote the original (Manim Community). You write a scene as a Python class and render it from the command line, for example manim -pql scene.py SquareToCircle, which produces an MP4 file (Manim quickstart).
For data structures, the Manim DSA plugin is "designed to animate common data structures and algorithms" and installs with pip install manim-dsa. Tools such as Animo go a step further: you describe the animation and an AI writes the code.
Building an animation sits at the Constructing level of the engagement taxonomy, and deciding what each frame shows forces you to understand the algorithm, but it takes hours. A week before an onsite, an hour spent on easing curves is an hour not spent on problems. Pick Manim if you also want to teach the topic, or for the one algorithm you keep getting wrong.
Worked Example: The LRU Cache, Three Ways
LRU Cache is a good test of all three methods, because the solution is two structures working together and that is hard to see in code alone.
The problem, LeetCode 146, asks for a cache with get and put that each run in O(1) average time and that evicts the least recently used key when it is full. The standard answer pairs a hash map with a doubly linked list: the map finds a node in O(1), and the list keeps the order of use so the oldest key sits at one end (Tech Interview Handbook).
In a visualizer. Open VisuAlgo's Hash Table module and its Linked List module in Doubly Linked List mode. Follow LeetCode's example with capacity 2: put(1, 1), put(2, 2), get(1). Before you move anything, predict which node is now least recently used. (Key 2: the get moved key 1 to the front, so put(3, 3) evicts key 2.)
In a narrated explainer. After you have solved it in ChatGPT, ask Explain Video Generator for a lesson on your solution. Scrimba's prompt advice is to name the topic, the audience and the slide types, so ask for "a flowchart of put, a code slide of the get method, for someone preparing for a coding interview in Python". For a feel of the format on this exact topic, Scrimba's sample explainer How Computers Clean the Cache covers Least Recently Used, Time to Live and First In, First Out eviction in 1:07 and ends with a one-question quiz.
In Manim. A first scene can be small:
from manim import *
class EvictKey2(Scene):
def construct(self):
keys = VGroup(*[Square().add(Text(k)) for k in ["1", "2"]]).arrange(RIGHT)
self.play(Create(keys))
self.play(FadeOut(keys[1])) # put(3, 3) evicts key 2
Then write it yourself: close every tab, write LRUCache from a blank file, and run it against the example. Solve it again in three days without looking: distributed practice, the other technique Dunlosky's review rated most effective. For problem sets, compare the coding interview prep platforms, and for a structured refresher, the data structures and algorithms courses. System design rounds need a different kind of picture, covered in system design interview prep with narrated diagrams.
Frequently Asked Questions
What is algorithm visualization?
Algorithm visualization shows an algorithm's data changing step by step: bars swapping in a sort, nodes relinking in a list, a frontier growing in a graph search. It comes as interactive visualizers you click through, narrated explainers you watch, or animations you code yourself, and it works best when you predict each step before you see it.
Is VisuAlgo free?
Yes. VisuAlgo, built at the National University of Singapore by Associate Professor Steven Halim, is offered at no cost. You can use its visualizations and e-Lecture Mode in the browser, and each module has an online quiz with randomly generated questions that are graded when you submit.
Is Manim free?
Yes. Manim is free and open source under the MIT license, maintained by the Manim Community and originally written by Grant Sanderson. It is a Python library, so you write each animation as code and render it to a video file. The Manim DSA plugin adds ready-made data structures.
Do algorithm visualizers help with coding interviews?
They help with understanding, which is the first half. Research on algorithm visualization points to how you use it: predicting each step engages you more than watching. The interview tests whether you can write the solution, so follow every visualization with a problem you solve from a blank file.
Can ChatGPT make an algorithm explainer video?
Yes, with a plugin. After you work a problem through in ChatGPT, type @, pick Explain Video Generator, made by Scrimba, and ask for a lesson on the solution. It opens on scrimba.com as narrated slides with diagrams and code, and you can watch it at up to 2.5x speed.
Key Takeaways
- You can see an algorithm run three ways: step through it in a visualizer, watch a narrated explainer, or code the animation in Manim.
- Predict each step before the tool shows it. Watching alone works like rereading.
- VisuAlgo and the USFCA pages cover the standard structures; Python Tutor runs your own code.
- For the reasoning behind a solution, ask Explain Video Generator in ChatGPT for a narrated lesson.
- Manim gives you full control and costs you time; save it for topics you want to teach.
- Every visualization ends the same way: write the solution from a blank file, then again a few days later.
Sources
- Banerjee, G., Murthy, S. and Iyer, S. "Effect of active learning using program visualization in technology-constrained college classrooms." Research and Practice in Technology Enhanced Learning, 2015. https://pmc.ncbi.nlm.nih.gov/articles/PMC6302837/
- Dunlosky, J. "Strengthening the Student Toolbox: Study Strategies to Boost Learning." American Educator, Fall 2013. https://www.aft.org/ae/fall2013/dunlosky
- VisuAlgo. https://visualgo.net/en
- Galles, D. "Data Structure Visualizations." University of San Francisco. https://www.cs.usfca.edu/~galles/visualization/Algorithms.html
- Python Tutor. https://pythontutor.com/
- Algorithm Visualizer. https://algorithm-visualizer.org/
- Manim Community. https://www.manim.community/
- Manim Community. "Quickstart." https://docs.manim.community/en/stable/tutorials/quickstart.html
- Manim DSA. https://manim-dsa.readthedocs.io/en/stable/index.html
- LeetCode. "146. LRU Cache." https://leetcode.com/problems/lru-cache/
- Tech Interview Handbook. "Algorithms study cheatsheet." https://www.techinterviewhandbook.org/algorithms/study-cheatsheet/
- Scrimba. "Explain in ChatGPT and Codex." https://docs.scrimba.com/explain/chatgpt-codex