Index

Module 03 · DSAWorked, and deeper

Shortest Paths, Worked (Dijkstra, Bellman-Ford, A*)

Shortest Path Traced
Shortest Path Traced · Open board

The same five-town map traced three times, once for each algorithm’s own rule for which road to check next, with the running distance written on every town.

Before you start. Graphs (BFS, DFS, Dijkstra, topological sort) showed you BFS, which finds the shortest path by counting turns, one road at a time - it assumes every road takes the same effort to drive. This lesson breaks that assumption: roads get real lengths, and three different procedures each earn their keep by handling that in a different way.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Review DSA →

Saved in this browser, and to your account when you sign in.