Pergunta de entrevista da empresa Microsoft

Number of connected components in a graph