How a map app finds your route, in 3 small steps · part 3 of 3 · Priority queues and A* search
How does a map app handle a whole city?
Scanning every junction for the closest is slow, so a priority queue (a min-heap) hands over the smallest at once. Then A* adds a straight-line guess of the time left, and the search narrows from a circle to a beam aimed at College.
What you turn: Heuristic on/off
The reel
The full lesson · 7:23
The long version
The same idea, slower: more examples, and pauses to try each step yourself.