Pregunta de entrevista de HashedIn by Deloitte

Find islands using hashmaps, write the code or explain algo