(int size)
| 8 | int[] size; |
| 9 | |
| 10 | public UnionFind(int size) { |
| 11 | this.parent = new int[size]; |
| 12 | this.size = new int[size]; |
| 13 | for (int i = 0; i < size; i++) { |
| 14 | this.parent[i] = i; |
| 15 | } |
| 16 | Arrays.fill(this.size, 1); |
| 17 | } |
| 18 | |
| 19 | public boolean union(int x, int y) { |
| 20 | int repX = find(x); |
nothing calls this directly
no outgoing calls
no test coverage detected