Pregunta de entrevista de Google

Leet code problem with counting the islands.