`
Dijkstra's algorithm is an algorithm that is used to find shortest paths in a graph. It was discovered by computer scientist Edsger W. Dijkstra, who published the result in his famous paper A Note on Two Problems in Connexion with Graphs (1959). The original version of Dijkstra's algorithm calculates the shortest route between two cities using other cities as intermediate stops. However, the same algorithm can also be used to solve the problem of finding the shortest paths from a single city to all other cities. Now it is your turn to show how this can be done.
What do you have to do? You have to find the shortest paths from one starting city to all other cities in Germany by applying Dijkstra's Algorithm. Step by step you will have to choose a direction and decide where to go next.
Important! It is possible to find the shortest paths in multiple ways. However, you have to choose the solution that is obtained by using Dijkstra's algorithm. For more details on Dijkstra's algorithm, see the book Algorithm Design by Jon Kleinberg and Éva Tardos.
Give it a try! Did you find the optimal solution?