Lab / Graph Algorithms

Graph Algorithms

Build graphs interactively and watch algorithms explore them step by step. Visualize queues, distances, and paths as they animate.

Click: add node | Shift+drag: edge | Right-click: delete | Double-click edge: set weight
Dijkstra

Finds shortest paths using a priority queue. Non-negative weights only.

Complexity: O((V + E) log V)
Presets
Legend
Unvisited
Frontier
Processing
Visited/MST
Path/Relaxed

Click the canvas to add nodes. Shift+drag between nodes to create edges. Right-click to delete. All computation runs entirely in your browser.