This is how Google Maps finds the fastest way to your destination. Build a map of locations and roads, then watch the computer find the cheapest route step by step.
Dijkstra's algorithm finds the shortest path between two points in a network with weighted connections. It's used everywhere β from GPS navigation to internet routing to finding cheapest flights!
| Location | Cost | Came from | Status |
|---|
There are two ways to represent a graph (network) in a computer's memory. Click to see each one for your current map:
Dijkstra's algorithm finds the shortest route β like a sat-nav working out directions.