title: Faster second-best MST algorithm?
body: <p>I am struggling with this. </p>
  
  <p>We can get MST using Kruskal's algorithm or Prim's algorithm for the MST.</p>
  
  <p>And for "second-best" MST, I can:</p>
  
  <ol>
  <li>first get MST using either of the algorithm mentioned above.</li>
  <li>For each V-1 of the optimal edge from the MST:<br>
  a. first remove or flag the edge<br>
  b. continue calculating MST without that
  edge<br>
  c. compare and record down that "second-best" MST with
  previous iteration</li>
  <li>In the end we have "second-best" MST</li>
  </ol>
  
  <p>But this runs in O(VE) where V is num of vertex and E is number of edges.</p>
  
  <p>How can get a speed up using Union-find disjoint set or LCA(lowest common ancester) ?</p>
  
  <p>hints, pseodo code, or web links pointers.</p>
  
  <p>Any help would be highly appreciated! Thanks:)</p>