Microsoft interview question

Number of islands coding problem