Interactive algorithm learning

Algorithm Visualizer

See each decision, state change, and line of code. This English catalog contains 95 focused pages built from the same tested visual engines as the full Chinese catalog.

Browse the catalog

95 pages, one coherent learning catalog

Use the tools first, or jump directly into one of 92 translated data structure and algorithm pages.

Learning Toolkit

Start with a compact reference or follow a guided route through the catalog.

Data Structures

Understand compact structures that make repeated updates and queries efficient.
Array

Array

Explore indexed access, middle insertion and deletion, and the amortized doubling strategy behind dynamic arrays.
Linked List

Linked List

Follow next and previous references, compare traversal with constant-time rewiring, and preserve bidirectional links.
Stack

Stack

Push, pop, and peek through one active end while preserving last-in, first-out ordering.
Queue and Deque

Queue and Deque

Compare first-in, first-out processing with a double-ended queue that supports both ends.
Binary Search Tree

Binary Search Tree

Insert, search, and traverse an ordered tree, then compare a balanced shape with a degenerate chain.
Binary Heap

Binary Heap

Keep the maximum at the root while array and tree views trace every sift-up and sift-down swap.
Hash Table

Hash Table

Resolve collisions with separate chaining or linear probing and observe how load factor changes lookup work.
Graph

Graph

Traverse vertices and edges with a BFS queue or DFS stack and compare their frontier behavior.
Trie

Trie

Trace exact and prefix searches through shared character paths and reveal autocomplete candidates.
Disjoint Set Union

Disjoint Set Union

Unite components, find representative roots, and watch path compression flatten parent forests.
LRU Cache

LRU Cache

Combine a hash table and doubly linked list to update recency and evict the least recently used key.
Skip List

Skip List

Search a randomized hierarchy of linked express lanes by moving right and descending level by level.
Segment Tree

Segment Tree

Decompose range sums into complete segments and propagate a point update from leaf to root.
B+ Tree

B+ Tree

Descend through wide index nodes for exact lookup, then follow linked leaves for a range scan.
Bloom Filter

Bloom Filter

Set and probe several hash-selected bits to distinguish definite absence from possible membership.
Fenwick Tree

Fenwick Tree

Visualize lowbit jumps for prefix queries and point updates in a Fenwick Tree, with every affected range and tree value shown step by step.

Sorting

Compare adjacent swaps, divide and conquer, heaps, and non-comparison counting.
Bubble Sort

Bubble Sort

Watch adjacent comparisons move the largest remaining value to the sorted suffix on every Bubble Sort pass.
Cocktail Shaker Sort

Cocktail Shaker Sort

Alternate forward and backward Bubble Sort passes so both large and small misplaced values move quickly.
Bitonic Sort

Bitonic Sort

Build bitonic sequences and merge them through a fixed comparison network whose columns can run in parallel.
Selection Sort

Selection Sort

Scan the unsorted suffix for its minimum and place exactly one value on every outer pass.
Insertion Sort

Insertion Sort

Grow a sorted prefix by shifting larger values right and inserting each key into its final local position.
Binary Insertion Sort

Binary Insertion Sort

Use binary search inside the sorted prefix to locate an insertion point before shifting values into place.
Shell Sort

Shell Sort

Run insertion sort over shrinking gaps so distant inversions disappear before the final adjacent pass.
Merge Sort

Merge Sort

Follow bottom-up Merge Sort as adjacent sorted runs are merged through an auxiliary array and copied back.
Top-Down Merge Sort

Top-Down Merge Sort

Split recursively to single values, then merge sorted halves while the call stack exposes divide and conquer.
Quick Sort

Quick Sort

Watch Lomuto partitioning place each pivot, inspect the explicit interval stack, change the input, and follow Quick Sort code in four languages.
Three-Way Quick Sort

Three-Way Quick Sort

Partition values into less-than, equal-to, and greater-than regions so duplicate pivots finish together.
Dual-Pivot Quick Sort

Dual-Pivot Quick Sort

Choose two pivots and partition one interval into three regions during a single scan.
Heap Sort

Heap Sort

Build a max heap, extract its root into the sorted suffix, and watch array and tree views stay synchronized.
Counting Sort

Counting Sort

Count a compact integer value range into buckets, then write values back in order without comparing elements.
Radix Sort

Radix Sort

Distribute values by one digit at a time and collect buckets stably from least to most significant digit.
Bucket Sort

Bucket Sort

Scatter values across numeric ranges, sort each bucket independently, and concatenate the ranges in order.

Graph Algorithms

Trace shortest paths, spanning structures, and dependency order one edge at a time.
Dijkstra's Shortest Path

Dijkstra's Shortest Path

Trace Dijkstra's algorithm as it settles the nearest vertex, relaxes weighted edges, and builds a shortest-path tree on a directed graph.
Kruskal's Minimum Spanning Tree

Kruskal's Minimum Spanning Tree

Process weighted edges from lightest to heaviest, use disjoint sets to reject cycles, and watch Kruskal build a minimum spanning tree.
Prim's Minimum Spanning Tree

Prim's Minimum Spanning Tree

Grow one connected tree from a starting vertex by repeatedly taking the lightest edge that crosses from the tree to an outside vertex.
Bellman-Ford Shortest Paths

Bellman-Ford Shortest Paths

Relax every directed edge for V-1 rounds, follow distances through negative edges, and reveal the final shortest-path tree.
Topological Sort

Topological Sort

Run Kahn's algorithm on a directed acyclic graph, remove zero-indegree vertices, and watch each dependency update the final order.
Floyd-Warshall

Floyd-Warshall

Update an all-pairs distance matrix by allowing one additional intermediate vertex per round.
Strongly Connected Components

Strongly Connected Components

Trace Tarjan discovery and low-link values as one DFS stack emits maximal mutually reachable components.
2-SAT

2-SAT

Convert two-literal clauses into implications, group them by SCC, and derive a satisfying assignment.
Maximum Flow

Maximum Flow

Find augmenting paths in a residual network, push each bottleneck, and use reverse edges to reroute flow.
Bipartite Matching

Bipartite Matching

Use augmenting paths to reassign occupied partners and increase a bipartite matching one edge at a time.
Lowest Common Ancestor

Lowest Common Ancestor

Build binary-lifting ancestors, align node depths, and jump together to find their deepest shared ancestor.
Eulerian Path

Eulerian Path

Run Hierholzer stack traversal, consume every edge once, and append vertices while dead ends unwind.

Dynamic Programming

Build reusable state transitions and compare competing choices.

Backtracking and Search

Explore a decision space, reject invalid branches, and undo choices safely.

String Algorithms

Reuse prefix and palindrome structure to avoid repeated comparisons.

Math and Number Theory

Turn divisibility and prime structure into efficient iterative procedures.

Computational Geometry

Use geometric invariants to reason about boundaries and distances.

Searching

Maintain a precise candidate interval and discard impossible answers.