(node: string)
| 158 | } |
| 159 | |
| 160 | find(node: string): string { |
| 161 | if (node !== this.parent[node]) { |
| 162 | this.parent[node] = this.find(this.parent[node]) |
| 163 | } |
| 164 | return this.parent[node] |
| 165 | } |
| 166 | |
| 167 | union(node1: string, node2: string): void { |
| 168 | const root1 = this.find(node1) |
no outgoing calls
no test coverage detected