Faster second-best MST algorithm?
问题 I am struggling with this. We can get MST using Kruskal's algorithm or Prim's algorithm for the MST. And for "second-best" MST, I can: first get MST using either of the algorithm mentioned above. For each V-1 of the optimal edge from the MST: a. first remove or flag the edge b. continue calculating MST without that edge c. compare and record down that "second-best" MST with previous iteration In the end we have "second-best" MST But this runs in O(VE) where V is num of vertex and E is number