Dijkstra's Algorithm Issue
问题 I'm working on a program where I have to find the shortest path between 12 cities, starting in Seattle and ending in Miami. I'm using Dijkstra's Algorithm because the paths are weighted. Here is my code so far, it all works except the answer I get is not the one I need, although it is correct. This part of the code sets everything up as well as creates the sorting algorithm. class Graph { Dictionary<string, Dictionary<string, int>> vertices = new Dictionary<string, Dictionary<string, int>>();