This lab will allow you to test your knowledge of what you saw earlier in Dijkstra's Shortest Path Algorithm with practical examples. The default graph asks you to find the cheapest path from node A to node F. Generate weighted node networks, create your own nodes and edges, and then step through Dijkstra's algorithm as it gradually discovers the cheapest path.
Goal: A to F
Generate a graph or run an algorithm to begin.
Tip: drag nodes to rearrange the graph. Use Customize to generate graphs, add nodes, connect edges, and choose start/end nodes.
| Step | What Happened |
|---|
No run yet.
| Node | Best Known Cost | Came From | Status |
|---|
Dijkstra's algorithm cares about the total cost of the edges, not just the number of connections between nodes. When the graph has uneven weights, the path with fewer hops is often not the cheapest path. That mismatch is where the algorithm earns its snacks.
The generator always creates a connected graph first, then adds extra weighted edges based on the density slider. That means Dijkstra should usually have a valid route to discover, while still leaving enough randomness for surprising paths to show up.
If you need a quick refresher, revisit the Dijkstra's Shortest Path Algorithm walkthrough and then come back here to keep experimenting.
Just a final word before we wrap up. What you've seen here is freshly baked content without added preservatives, artificial intelligence, ads, and algorithm-driven doodads. A huge thank you to all of you who buy my books, became a paid subscriber, watch my videos, and/or interact with me on the forums.
Your support keeps this site going! 😇

:: Copyright KIRUPA 2026 //--