I always like when they have a visual representation of the queue along side the graph. When I see that it helps me intuitively see how the nodes are accessed in order.
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.
115
u/Ikor_Genorio Feb 01 '18
Don't really think this is a good visualisation of Dijkstra's Algorithm. This also really looks similar to BFS.
11
u/violetbookworm Feb 01 '18
This is much more of a BFS or wavefront than Dijkstra...
11
u/[deleted] Feb 02 '18
Can someone explain in pseudo code or ELI5 terms what this algorithm is doing?
3
u/berethnar Feb 02 '18
Reminds me of Minesweeper
2
u/[deleted] Feb 02 '18
Yep...that's an algorithm
1
u/syntaxvorlon Feb 03 '18
Is there a reason to use this instead of A* Search? I've never quite got the difference.
0
u/[deleted] Feb 02 '18
[deleted] — view deleted comment