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.
I've just made a translation to Java of this kata. Please take a look at it and approve it if you consider it correct:
https://www.codewars.com/kumite/664fa3ac97f86799e35207bb?sel=664fa3ac97f86799e35207bb
I've incorporated your suggestion to the kata description.
Any suggestion for a less confusing single word for "same-color adjacent rectangular regions"?
Yes, "overlapping" rectangles is a different problem.
I marked them as containing spoilers because they contain hints (sometimes subtle ones, sometimes even quite specific) about how someone could resolve the kata. Sorry about that.
Maybe I can try to make more concise comments in which I only answer the question without details or possible hints.
Answering your question without spoilers:
No, the shape of the found regions does not alter how many you should find, so it doesn't matter. The count is the same.
With respect to overlapping regions, you should think how would you decompose that into rectangular regions, even if they are adjacent and of the same color. So, answering your question, that would be decomposed into 3 regions.
Maybe "overlapping" is not the best name. I wanted to convey a single word for same-color adjacent regions.
I don't understand why you added spoilers to all these comments. All I'm asking is a clarification of the specification.
This comment is hidden because it contains spoiler information about the solution
Sample tests are checking for the requirements of the kata (empty input, simple data, etc).
I have gone through the tests to see if they are representative and I think they are: They check for empty pictures (size 0), simple pictures (one region), pictures with overlapping regions, pictures with non-overlapping regions in different orientations, and other simple pictures.
What comes next in the full test suite is just bigger pictures with bigger regions, but more or less the same as these simple tests.
Is there some specific test that is troubling you? I can see if I can devise an example test for a confusing part of later tests if it helps.
Anyway, thanks for the feedback!
I've corrected the ordering both for the sample tests and for the full test suite, including not only the order of individual tests but also the order of groups of tests. I hope that reduces confusion.
another thing about overlaps (let's only consider 1's):
can we see 2 overlapping regions here, or are there 3 regions?
for
why do you claim
instead of
Does it even matter what the exact regions are?
(sample) Tests are not ordered in the same way as written in code. This is confusing and gives bad user experience.
I pass all sample tests, but not fixed or random tests. It seems sample tests are not entirely representitive of tests to come ..
Loading more items...