狄克斯特拉算法,找出图中权重最小的路径
#!python
#coding=utf-8
"""
狄克特斯拉算法
有以下图:
start --6-->a
start --2-->b
a --1-->end
b --5-->end
b --3-->a
使用迪克斯特拉算法找出start-->end
权重最小的路径
"""
def build_graph():
graph = {
}
graph["start"] = {
"a": 6, "b": 2}
graph["a"] = {
"end": 1}
graph[