Return the parent of x
(x: Node)
| 40 | |
| 41 | |
| 42 | def find_set(x: Node) -> Node: |
| 43 | """ |
| 44 | Return the parent of x |
| 45 | """ |
| 46 | if x != x.parent: |
| 47 | x.parent = find_set(x.parent) |
| 48 | return x.parent |
| 49 | |
| 50 | |
| 51 | def find_python_set(node: Node) -> set: |
no outgoing calls