| 22 | } |
| 23 | |
| 24 | fun find(x: Int): Int { |
| 25 | if (x == parent[x]) { |
| 26 | return x |
| 27 | } |
| 28 | // Path compression. |
| 29 | parent[x] = find(parent[x]) |
| 30 | return parent[x] |
| 31 | } |
| 32 | |
| 33 | fun getSize(x: Int): Int { |
| 34 | return size[find(x)] |
nothing calls this directly
no outgoing calls
no test coverage detected