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 had the same code as the owner of this post. Thank you for noticing this loophole. I think it was not considered by the creator of the Kata when the checker was coded.
Indeed, this would fail on some cases. Probably because the test were not tight enough 2 years ago, one of them being
I thought so too at first, but since we are iterating over every mark in the inputs it will eventually split the string on the leftmost marker.
If this wasn't true, than some the tests would fail.
This comment is hidden because it contains spoiler information about the solution
Thanks for your feedback!
I have not read the condition carefully.
I really thought that the condition is imposed on the input parameter, and not on the result.
The fixed solution is here:
https://www.codewars.com/kata/reviews/5b86545bb80ee00ca6000358/groups/5fa7cc73a3c4740001e6a6f8
I understand what you mean.
Actually, I did the re-assignment to the input.
s
in the above part is still the input.first
s
in the above part is the output.all vairable
s
in this part are not the input (it's already assigned to new value). Those are the output.Sample Test
you can add this test to the smaple tests. It will work properly 😉.
Hope this clear to you.
Thank you for checking my code 😊