DSA visualizer library
DSA Visualizer: Interactive Algorithm Execution
Master data structures and algorithms with 105 interactive visualizers: algorithm simulators you run one operation at a time, with the matching line of code highlighted. Control the flow yourself and build intuition instead of memorizing code.
Interactive Visualizers
Topic Categories
Languages (JS, TS, Python, Java, C, C++)
Free Lessons
What You'll Learn
Sorting Algorithms (Merge, Quick, Heap, Radix)
Graph Traversals (BFS, DFS) & Shortest Paths
Dynamic Programming Patterns & Memoization
Tree Traversals & Binary Search Trees
Greedy Algorithms & Backtracking
Time & Space Complexity Analysis (Big O)
Hashing, Stacks, Queues & Linked Lists
Advanced: Segment Trees, Tries, Disjoint Sets
Choose a Topic to Start
Popular algorithm visualizers
The algorithms most often looked up by name. Each one runs a step at a time with the matching line of code highlighted.
Merge Sort visualizer
The array splits into halves until single elements remain, then merges back in sorted order.
Quick Sort visualizer
Follow the pivot as partitioning moves smaller values left and larger values right, then recurses on each side.
Bubble Sort visualizer
FreeAdjacent pairs are compared and swapped until the largest value settles at the end of each pass.
Binary Search visualizer
The search range halves on every comparison until the target is found or the range is empty.
Linked List visualizer
Insert and delete nodes and see exactly which next pointers change.
Stack visualizer
FreePush and pop on a last-in, first-out stack and track the top as it moves.
Hash Map visualizer
Keys are hashed to buckets, with collisions resolved as you insert.
Binary Search Tree visualizer
Insert, search and delete by following the left-or-right decision at each node.
Red-Black Tree visualizer
Recolouring and rotations keep the tree balanced after every insert.
Heap visualizer
Insert and extract while values sift up and down to restore the heap property.
Breadth-First Search visualizer
FreeThe queue expands the graph level by level outward from the start node.
Dijkstra's Algorithm visualizer
Tentative distances shrink as the closest unvisited node is settled each round.
How to learn an algorithm by watching it run
Memorising a solution gets you through one question. Being able to derive it gets you through the follow-up. These visualizers are built for the second outcome, and they work best used deliberately rather than watched.
- 01
Read the intuition first
Every lesson opens with the idea behind the algorithm in plain language, before any code. If the intuition does not land, the code will not either.
- 02
Predict the next step
Before you advance the visualizer, decide what you think happens next, which pointer moves, which branch is taken. Being wrong is the part that teaches you.
- 03
Step, do not play
Advance one operation at a time and watch the state change. The code line producing each step is highlighted as it runs, so the trace and the implementation stay connected.
- 04
Change the input and repeat
Reset with different values, especially edge cases: empty input, duplicates, already-sorted data. An algorithm you can predict on unfamiliar input is one you understand.
Every DSA visualizer, by topic
The complete curriculum. Each lesson pairs an interactive visualizer you step through yourself with the implementation in JavaScript, TypeScript, Python, Java, C and C++. Lessons marked Free open without payment.
Data Structures · 28 lessons
- StackFree
- QueueFree
- Deque
- Circular Queue
- Priority Queue (ADT)
- Tree Traversal
- Binary Tree
- Binary Search Tree
- AVL Tree
- Trie (Prefix Tree)
- Segment Tree
- Fenwick Tree
- Red-Black Tree
- Singly Linked List
- Doubly Linked List
- Circular Linked List
- Graph RepresentationFree
- Breadth First SearchFree
- Depth First Search
- Topological Sort
- Cycle Detection
- Connected Components
- Bipartite Graph
- Dijkstra's Algorithm
- Bellman-Ford Algorithm
- Minimum Spanning Tree
- Floyd-Warshall Algorithm
- Bridges & Articulation Points
Frequently asked questions
What is a DSA visualizer?
A DSA visualizer renders a data structure or algorithm as it runs, so you can watch each comparison, swap, pointer move and recursive call happen instead of reading the finished code. On FaangPrep you control the execution yourself: step forward one operation at a time, or reset and try different input.
Is the DSA visualizer free to use?
Yes. Starter lessons across every topic open without an account: they are marked "Free" throughout the curriculum. Every other visualizer opens with a free account, with no card required. The paid courses are the pattern library and the DSA 75 sprint, each a one-time purchase with lifetime access.
Which programming languages are the solutions written in?
Every lesson that ships code ships it in all six: JavaScript, TypeScript, Python, Java, C and C++, so you can read the algorithm in whichever language you will actually write in your interview. The three topic introductions are prose and a diagram, with no implementation to show.
How is this different from watching an algorithm animation?
An animation plays at its own pace and you watch it. These visualizers hand you the controls: you step, pause, reset and change the input, and each step is paired with the line of code producing it. The point is to predict what happens next and then check yourself, which is what makes the behaviour stick.
Do I need to know how to code before starting?
You need to be able to read code in one language. The Basics topic starts from time and space complexity and Big-O notation, so no prior data structures knowledge is assumed.
Where should I start?
Start with Basics if complexity analysis is new to you, then work through Arrays and Strings before Data Structures. If you are preparing for an interview and already know the fundamentals, go to the DSA Patterns library instead: it organises the same material around the patterns interview questions are built on.
