Problem Description
Loading...
Problem Analysis
Actually, this is just finding the number of cycles
Merging again when they are already in the same setfind(x)==find(y)
then a cycle is formed, res++
cpp
| |
Actually, this is just finding the number of cycles
Merging again when they are already in the same setfind(x)==find(y)
then a cycle is formed, res++
| |
Loading...