An island is surrounded by a group of adjacent cells that are all 1s.
Do you mean it's surrounded by adjacent 0's?
a correct way to say it would be "an island is a group of adjacent cells that are all 1s, surrounded by 0s or array's margins"
This picture should clarify what it means. Each color group represents each island.
Thanks, that's what I thought it meant, but wasn't sure.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Do you mean it's surrounded by adjacent 0's?
a correct way to say it would be "an island is a group of adjacent cells that are all 1s, surrounded by 0s or array's margins"
This picture should clarify what it means. Each color group represents each island.
Thanks, that's what I thought it meant, but wasn't sure.