Pergunta de entrevista da empresa HashedIn by Deloitte

Find islands using hashmaps, write the code or explain algo