Oracle Interview Question

Number of islands leetcode problem