MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __init__

Method __init__

graphs/minimum_spanning_tree_kruskal2.py:10–13  ·  view source on GitHub ↗
(self, data: T)

Source from the content-addressed store, hash-verified

8class 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
16class DisjointSetTree[T]:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected