brianchan.us
Dijkstra’s algorithm
My version in python. The code is specific to how g, the graph matrix is defined. Here is a good explanation to why we need to get the vertex with min edge in each iteration. Ref: