Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ recipe-577225.py
File
recipe-577225.py
recipes/Python/577225_UnionFind/recipe-577225.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
""
"
2
MakeSet(x) initializes disjoint set
for
object x
3
Find(x) returns representative object of the set containing x
4
Union(x,y) makes two sets containing x and y respectively into one set
Callers
nothing calls this directly
Calls
6
str
Function · 0.85
MakeSet
Function · 0.85
Find
Function · 0.85
groupby
Method · 0.80
Node
Class · 0.70
Union
Function · 0.70
Tested by
no test coverage detected