Question d’entretien chez Google

Leet code problem with counting the islands.