Pergunta de entrevista da empresa Bloomberg

The number of islands question from leetcode