TikTok Interview Question

Number of connected land masses leetcode