Workspace Network Merge
0d
DSA Games: Learn Algorithms by Playing

Network Merge

Connect stations using disjoint sets and union by size.

Level 01 / 15

Network merge

Connect all stations with union by size.

How to play

For each link, find both representatives and choose the larger root. If sizes tie, choose the first endpoint’s root.

Network MergePlaying
Link
4 → 3
Components
5
Parent array
01234
01234