EduChat interview question

2 dimensional array island problem