next up previous
Next: Up: Previous:

Disjoint Sets

*
Keep keys in disjoint sets
*
Find set containing key
*
Union two sets
*
Application: determine connected components of an undirected graph

   make each vertex a set
   foreach edge
      union sets containing vertices of edge


next up previous
Next: Up: Previous: