Minimum Time for K Connected Components
Add the edges back in order of decreasing removal time with union-find; the component count recorded before each time group gives the answer.
Add the edges back in order of decreasing removal time with union-find; the component count recorded before each time group gives the answer.