Consider the following weighted directed graph:
Dijkstra algorithm is ran, starting at . What is the order in which vertices get removed from the priority queue?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Actually it depends on how you implement Dijkstra's Algorithm. The priority queue might have duplicate numbers in my implementation but I assume just look at the first occurrence.