Visualize an algorithm
Every entry below runs on the same deterministic execution engine: generate all steps up front, then step forwards, backwards and through the code with the exact state each moment produced.
Searching
2 visualizationsSorting
6 visualizationsBubble Sort
beginnerRepeatedly swap neighbouring values that are out of order.
Selection Sort
beginnerSelect the minimum of the unsorted region and lock it in.
Insertion Sort
beginnerGrow a sorted prefix by sliding each new value into place.
Merge Sort
intermediateSplit in half, sort recursively, then merge the halves.
Quick Sort
intermediatePartition around a pivot, then recurse on both sides.
Heap Sort
intermediateBuild a max-heap, then repeatedly extract the maximum.
Arrays & Two Pointers
4 visualizationsArray Traversal
beginnerVisit every index once — the foundation of O(n) algorithms.
Insert & Delete in an Array
beginnerShift elements to open or close a gap in the middle.
Two Pointers
intermediateConverge two ends of a sorted array to find a target pair.
Sliding Window
intermediateMaintain a fixed-size range and update it in O(1) per step.
Linked Lists
5 visualizationsSingly Linked List
beginnerNodes with one pointer: traverse, insert and delete.
Doubly Linked List
intermediateEach node links backwards as well as forwards.
Circular Linked List
intermediateThe tail points back at the head — a closed loop.
Reverse a Linked List
intermediateFlip every pointer with three variables — a classic interview question.
Find the Middle Node
intermediateFloyd's tortoise and hare — two pointers at different speeds.
Stacks & Queues
5 visualizationsStack: Push & Pop
beginnerLast in, first out — the model behind undo, nesting and DFS.
Queue: Enqueue & Dequeue
beginnerFirst in, first out — arrivals leave in the order they came.
Circular Queue
intermediateA ring buffer that reuses emptied slots instead of wasting them.
Stack using Queues
advancedSimulate LIFO by reversing a FIFO queue on every push.
Queue using Stacks
advancedTwo stacks reverse an arrival order back into FIFO.
Trees
6 visualizationsBST Insertion
intermediateSmaller left, larger right — insert by following one path.
BST Search
intermediateOne path from root to leaf — never visit both children.
BST Deletion
advancedThree cases: leaf, one child, or the inorder successor.
Tree Traversals
intermediateIn-order, pre-order and post-order depth-first walks.
Level-Order Traversal
intermediateBreadth-first: read every node level by level using a queue.
AVL Tree Rotations
advancedRotate whenever a subtree gets more than one level taller.
Graphs
6 visualizationsAdjacency List
beginnerStore only the edges that actually exist.
Breadth-First Search
intermediateExplore in rings with a FIFO queue — shortest path on unweighted graphs.
Depth-First Search
intermediateDive down one branch, backtrack, repeat — with a stack.
Dijkstra's Algorithm
advancedSettle the closest unsettled node until every distance is final.
Cycle Detection
advancedThree-colour DFS: a back edge to a grey node means a cycle.
Topological Sort
advancedOrder dependencies by repeatedly removing in-degree-0 nodes.
Recursion & Dynamic Programming
5 visualizationsRecursion Call Stack
beginnerWatch frames push on the way down and pop on the way back.
Fibonacci: Recursion vs Memoization
intermediateThe same recurrence with and without a cache — a DP warm-up.
Climbing Stairs
beginnerCount the ways up with steps of 1 or 2 — Fibonacci in disguise.
0/1 Knapsack
advancedTake or skip each item — fill a 2D table of best values.
Longest Common Subsequence
advancedCompare two strings character by character in a 2D table.
Not sure where to start?
Follow the guided paths — beginner, intermediate and advanced — in order.