next up previous
Next: Up: Previous:

Operations

Make-Set(x)
$\;\;\;\;\;$parent(x) = x



FindSet(x)
$\;\;\;\;\;$Follow parent pointers from x to root
$\;\;\;\;\;$return root



Union(x, y)
$\;\;\;\;\;$parent(x) = FindSet(y)



Performance same as linked lists, but can do better.


next up previous
Next: Up: Previous: