Roblox interview question

Basic LeetCode Num Islands Question