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
| 0 | 1 | 2 | 3 | 4 |
| 0 | 1 | 2 | 3 | 4 |
Connect all stations with union by size.