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