Reconstructing the algorithm

Report a typo

Given below is Dijkstra's algorithm split by 5 parts. Sort them in the order that reconstructs the initial algorithm.

Put the items in the correct order
Consider all unprocessed neighbours of uu and update the current distance to each of them to a smaller value.
When all the neighbours of uu are considered, mark uu as processed.
Set the current distance to the source to 00, for all other nodes assign it to \infty. Mark all nodes as unprocessed.
If there are no unprocessed node, the algorithm is finished. Otherwise, go back to the 2nd step.
Find an unprocessed node uu with the smallest dist(u)dist(u).
___

Create a free account to access the full topic