singularity

Union-find / disjoint set / merge set

[LC-1579-remove-max-number-of-edges-to-keep-graph-fully-traversable]