Forgot How to Find the MST
There is a graph consisting of N vertices and M edges. All edges are bidirectional, and the weights of the edges are distinct.
Cody wants to find the Minimum Spanning Tree (MST) of the graph. However, Cody has forgotten how to find the MST and has devised the following strategy: