Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
yep, but thats not a valid solution, it doesnt check sides or corners of ships size >= 2
i dont know if you can paste this, but it will return 'true' with fileds like this
[[1, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1, 0, 1, 0, 0, 0, 0, 0, 1, 0],
[1, 0, 1, 0, 1, 1, 1, 0, 1, 0],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
[0, 0, 0, 0, 1, 1, 1, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 1, 1, 0, 0],
[0, 0, 0, 1, 0, 0, 0, 0, 0, 1],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 1, 0, 0, 0]]
check out what i did with lines 6 and 7
ok, i got it, thanks
according to this https://www.sciencedirect.com/science/article/pii/S0031320317301693 ..
a 4-connected component in a binary image is the maximum set of object pixels in the image such that any of two pixels in the set are 4-connected.
there are no 4 others, there can be 2 or much more pixels as a component.
why is a single and surrounded pixel considered as a 4-connected component? it says it should be a set of pixels...