Pregunta de entrevista de SimilarWeb

graph question that requirs "union-find"