My brother in-law is studying to for his final’s exam, as a bonus his teacher gave them an assignment that if they can complete will give them extra point.

He showed me the problem and it basically involve using Dijkstra’s algorithm.

Here is the code in it’s entirety: