next up previous
Next: Up: Previous:

Pseudocode

FindSet(x)
$\;\;\;\;\;$if x $\neq$ parent(x) $\;\;\;\;\;$ $\;\;\;\;\;$ $\;\;\;\;\;$ $\;\;\;\;\;$ $\;\;\;\;\;$ $\;\;\;\;\;$; Two-Pass Method
$\;\;\;\;\;$then parent(x) = FindSet(parent(x))
$\;\;\;\;\;$return parent(x)


next up previous
Next: Up: Previous: