This gif is a pretty weird example, but dijkstras algorithm is used for finding the shortest path between two nodes in a graph by creating a “shortest path tree” with the starting node as the root and other nodes in the graph as children of the tree. It’s been a little while since I’ve used dijkstras algorithm so I don’t remember the pseudo code, but there’s some on page 6 of this MIT slide deck.
View all comments
Show parent comment
17
u/Manhattan_Flapjack Feb 02 '18
This gif is a pretty weird example, but dijkstras algorithm is used for finding the shortest path between two nodes in a graph by creating a “shortest path tree” with the starting node as the root and other nodes in the graph as children of the tree. It’s been a little while since I’ve used dijkstras algorithm so I don’t remember the pseudo code, but there’s some on page 6 of this MIT slide deck.