fn find(&mut self, p: usize) -> usize {
        if p >= self.parents.len() {
            panic!("Index {} is out of bounds", p)
        }
        let mut id_p = p;
        while id_p != self.parents[id_p] {
            id_p = self.parents[id_p]
        }

        id_p
    }
/// Return the identifier of a component. It is a linear time operation (O(n)) in the worst case
/// because trees can get tall
///
/// * `p`: The index of the component
Return the identifier of a component. It is a linear time operation (O(n)) in the worst case
because trees can get tall

`p`: The index of the component
Return the identifier of a component . It is a linear time operation ( O ( n )) in the worst case because trees can get tall ` p ` : The index of the component
fn find(&mut self, p: usize) -> usize {
        if p >= self.parents.len() {
            panic!("Index {} is out of bounds", p)
        }
        let mut id_p = p;
        while id_p != self.parents[id_p] {
            id_p = self.parents[id_p]
        }
        id_p
    }
fn find ( & mut self , p : usize ) -> usize { if p >= self . parents . len ( ) { panic ! ( " " p ) } let mut id_p = p ; while id_p != self . parents [ id_p ] { id_p = self . parents [ id_p ] } id_p }
Return the identifier of a component.
Return the identifier of a component .
&mut self
p
usize
&mut self
p
usize