Given below are the steps of Kruskal's algorithm. Sort them in the order that reconstructs the initial algorithm.
Computer scienceAlgorithms and Data StructuresAlgorithmsGraph algorithmsMinimum spanning tree algorithms
Kruskal's algorithm
The steps of the algorithm
Report a typo
Put the items in the correct order
Repeat the previous step until all the edges have been processed.
Iterate over the sorted edges.
If the edge does not create a cycle, add it to the minimum spanning tree.
Return the minimum spanning tree.
Sort the edges of a graph by weight in a nondecreasing order. Create an empty minimum spanning tree.
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.