이 레슨은 당분간 영어로 제공돼요.
The cheapest way, not the shortest
BFS finds the route with the fewest roads. But roads differ: one takes a minute, another twenty. To find the cheapest route when every step has its own cost, you need Dijkstra's algorithm, and it uses the heap you just met.