Reconstructing the algorithm

Report a typo

Given below are the steps of Prim's algorithm. Sort them in the order that reconstructs the initial algorithm.

Put the items in the correct order
Repeat two previous steps while there are edges that can be added to the current tree. Then, return the resulting tree as a final answer.
Select an arbitrary node in a graph as the first node of a spanning tree.
Consider all edges {x,y}\{x, y\} such that xx is a node of the current tree and yy is not.
Among all such edges, chose the one with the smallest weight and add it to the current tree.
___

Create a free account to access the full topic