Master Dijkstra's algorithm. Learn to use priority queues to find the shortest path from a single source to all other nodes in a weighted graph.