Pregunta de entrevista de Goldman Sachs

LC Graph Question (No. Of Connected Islands)