All labsStart this quest
Computer science ~5 mingraph search, BFS, Dijkstra
Shortest by edges, or cheapest by cost?
Two searches, one graph, two different “shortest” paths.
Computer science · ~5 min · live model
Loading the lab…
Make a prediction, then push the model. What you discover is recorded here.
The idea behind this lab (open after you’ve tried it)
BFS minimises the number of edges. When edges have different costs, only a cost-aware search like Dijkstra finds the cheapest route.
Go deeper than one lab.
A full quest builds the idea step by step, with checks and a new case to apply it to.

