Dijkstra's algorithm: find the shortest path in a graph