Pergunta de entrevista da empresa Airwallex

Number of connected components in an undirected graph