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.
This seems to be fixed now
The kata spec is missing crucial information. If we're finding the exit but the exit has no special indication, how do we know whether a particular tile is an exit? The kata at least assumes that
Which are all missing from the spec.
Test failure message is broken:
The specs are so vague there are at least 3 possible interpretations of the task, and none of them is clear until you hit the next test case in the actual tests that invalidates your assumption (again).
Thank you for pointing this out! I have included a test to cover this.
Thank you for finding this oversight. The tests are now fixed with some of the cases having shuffled arrays.
Now, no existing solutions has failed against the following yet because the typical beta kata users are much better than CW users in general, but these edge cases will have to be handled to properly test for object property detection:
In every test case the input arrays are already sorted by
id
, which shouldn't be the case (this is not an assumption given). Some solutions have been abusing this observation.You'd be surprised how often everyone expects matches to be non-overlapping. As a prime example, Apache Commons
StringUtils.countMatches
specifically says the match is non-overlapping, and people keep referring to that when asked "how to count number of occurrences of a substring in a string in Java".To get this for small results you need to reduce
MAX_S_LENGTH
andn
, to something like1500
and10 - 20
.It probably means your
MAX_S_LENGTH
is still not big enough.Well, but it's big, like this:
I'm not sure I understand. I just tested the reference solution locally and got 376 on the inputs your provided. Do you have a particular test I could try to debug?
Changed to:
This was intentional. The description and tests where meant to be illustrative but not exhuastive. I can certainly add an overlapping hint but I feel that the language of "counts occurrences of a given string" is precise enough.
Loading more items...