learngraphtheory.org

Guest

Sign in to keep your graphs and progress.

Algorithm Selection

Select an algorithm and generate steps to begin visualization

BFS Visualizer Online

Interactive breadth-first search visualizer

Explores graph level by level, visiting all neighbors before moving deeper

Time: O(V + E)
Space: O(V)
Use Case: Shortest path in unweighted graphs, level-order traversal
Showing the example graph for this algorithm.
Algorithm Execution

Select an algorithm and generate steps to begin visualization

Algorithm index

All Graph Theory Algorithms

Browse all 90 interactive algorithm visualizers, grouped by topic. Open any one to build a graph and watch the algorithm run step by step.

Shortest paths

The cheapest route between vertices: from one source, between all pairs, or the k best.

8

Trees & spanning trees

Minimum spanning trees and arborescences, Steiner trees, tree diameters, trees as codes (Prüfer sequences, Huffman coding) and ancestor queries.

11

Connectivity & structure

How a graph holds together: components, reachability, cut vertices, bridges, bipartite and degree tests.

11

Tours & routes

Walks through every edge or every vertex: Euler tours, de Bruijn genome assembly, the Chinese postman, Hamiltonian paths, the knight's tour and the TSP.

9

Coloring & cliques

Give neighbours different colours, colour edges, find cliques and vertex covers, and recognise chordal and planar graphs.

8

Flows, cuts & matching

Push flow through a network, find its weakest cut and pair up two groups.

9

Network analysis

Rank pages and people, measure clustering, peel k-cores, split and group a network, and watch something spread through it.

14

Logistics & location

Where to open facilities, how to pack goods and how to route a fleet of trucks.

7

Scheduling

Critical paths, PERT estimates, schedules with limited resources, and intervals packed into the fewest rooms.

4

Optimization

Step-by-step calculators for linear programming, assignment, transportation and scheduling.

8
All optimization tools

Browse the graph theory lessons · Read the in-depth articles