Pergunta de entrevista da empresa Two Sigma

Write an algorithm to list the connected components of a graph given it's adjacency matrix.