(int nodes)
| 33 | int parent[]; |
| 34 | int size[]; |
| 35 | DisjointSet(int nodes){ |
| 36 | this.parent = new int[nodes]; |
| 37 | this.size = new int[nodes]; |
| 38 | for(int i=0;i<nodes;i++){ |
| 39 | this.parent[i] = i; |
| 40 | this.size[i] = 1; |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | public int findRootParent(int node){ |
| 45 | if(node == parent[node]){ |
nothing calls this directly
no outgoing calls
no test coverage detected