Oracle interview question

Number of islands leetcode problem