pub fn merge(&mut self, u: usize, v: usize) -> bool {
        let (pu, pv) = (self.find(u), self.find(v));
        self.parent[pu] = pv;
        pu != pv
    }
/// Merges the sets containing u and v into a single set containing their
/// union. Returns true if u and v were previously in different sets.
Merges the sets containing u and v into a single set containing their
union. Returns true if u and v were previously in different sets.
Merges the sets containing u and v into a single set containing their union . Returns true if u and v were previously in different sets .
pub fn merge(&mut self, u: usize, v: usize) -> bool {
        let (pu, pv) = (self.find(u), self.find(v));
        self.parent[pu] = pv;
        pu != pv
    }
pub fn merge ( & mut self , u : usize , v : usize ) -> bool { let ( pu , pv ) = ( self . find ( u ) , self . find ( v ) ) ; self . parent [ pu ] = pv ; pu != pv }
Merges the sets containing u and v into a single set containing their
union.
Merges the sets containing u and v into a single set containing their union .
&mut self
u
usize
v
usize
&mut self
u
usize
v
usize