Domanda di colloquio di Oracle

Solve the connected components of a graph algorithm question.