Constructs a minimum spanning tree by repeatedly adding the shortest edge that does not form a cycle.
Explain code with DocComment! Try out your own code!