Bloomberg Interview Question

Number of Islands, Desert/oasis question on leetcode