Pregunta de entrevista de X

Question with finding islands within nested arrays