1 #include "unionfind.hh"
3 see a book on data structures
6 Union_find::Union_find (int n)
10 for (int i=0; i < n; i++)
17 Union_find::find (int i)
20 while (classes_[rep] != rep)
22 while (classes_[i] != rep)
24 int next =classes_[i];
32 Union_find::connect (int i, int j)