Microsoft Interview Question

Number of islands style recursive problem