Question d’entretien chez Goldman Sachs

LC Graph Question (No. Of Connected Islands)