We want to get the shortest path starting from to other nodes.

Let be the explored nodes. For , length of a shortest path from to .

For , .

It requires no negative values of vertex.

Running time is . Can be improved to via priority queue.

Cannot handle the graph with negative cycle.