Question d’entretien chez Amazon

Design a graph traversal algorithm to count islands