let largestComponent c =
    Array.sort (fun x y -> compare (List.length x) (List.length y)) c;
    (List.length c.(Array.length c - 1))