| 10 | |
| 11 | public: |
| 12 | DSU(int n) |
| 13 | { |
| 14 | parent = new int[n]; |
| 15 | rank = new int[n]; |
| 16 | |
| 17 | for (int i = 0; i < n; i++) { |
| 18 | parent[i] = -1; |
| 19 | rank[i] = 1; |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | // Find function |
| 24 | int find(int i) |
nothing calls this directly
no outgoing calls
no test coverage detected