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
)
32 Union_find::connect (int i
, int j
)