Bloomberg Interview Question

Leetcode: Number of Islands problem