graph-Dijkstra's shortest-path alogorithm

直接贴代码吧,简明易懂。 后面自己写了测试,输入数据为: a b c d e 0 1 4 0 2 2 1 2 3 1 3 2 1 4 3 2 1 1 2 3 4 2 4 5 4 3 1 也就是课本上111的图4.9(上面为原图,下面为结果) 程序的输出结果为: #include <iostream> #include <string> using namespac
本站公众号
   欢迎关注本站公众号,获取更多信息