(self, n: int)
| 41 | @return: true if it's a valid tree, or false |
| 42 | """ |
| 43 | def __find(self, n: int) -> int: |
| 44 | while n != self.parents.get(n, n): |
| 45 | n = self.parents.get(n, n) |
| 46 | return n |
| 47 | |
| 48 | def __connect(self, n: int, m: int) -> None: |
| 49 | pn = self.__find(n) |
no test coverage detected