Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ DisjointSetTreeNode
Class
DisjointSetTreeNode
graphs/minimum_spanning_tree_kruskal2.py:8–13 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
6
7
8
class
DisjointSetTreeNode[T]:
9
# Disjoint Set Node to store the parent and rank
10
def
__init__(self, data: T) -> None:
11
self.data = data
12
self.parent = self
13
self.rank = 0
14
15
16
class
DisjointSetTree[T]:
Callers
1
make_set
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected