Hello. I'm writing an algorithm for finding the second min cost spanning tree. my idea was as follows:
- Use kruskals to find lowest MST.
- Delete the lowest cost edge of the MST.
- Run kruskals again on the entire graph.
- return the new MST.
My question is: Will this work? Is there a better way perhaps to do this?