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.
Great problem-solving skills!
This comment is hidden because it contains spoiler information about the solution
How on earth did this get published?
Unfortunately, your kata was retired due to low satisfaction votes.
This would be the correct decision. If there are no matches, that could be perfectly represented by an empty array.
You're confusing sample tests with submission tests.
This is a bad idea as input validation would only distract the user from the main task. What I meant was that, at minimum, a test case with no matches should have been present in the sample tests.
You didn't, that's the issue. Users could simply hardcode the expected outputs for your test cases to pass the kata. You should read the documentation on why both fixed tests and random tests are necessary.
It's good that your kata had an original backstory, but the task also needs to be novel. As I pointed out, there already are multiple trivial map/filter tasks.
You're welcome. I recommend joining Codewars' discord server. There are dedicated channels where you can ask questions about codewars, including: solving kata, authoring kata, translating kata, kata ideas, etc.
Good luck in your future kata.
Hi Nuno,
Thank you for your feedback. I did think after reading the documentation that I fulfilled what was required. But that might speak to my lack of experience in coding and authoring Katas in general!
I'd like to address your points in order:
I hope you don't see my replies as combative! I'm purely here to learn :) I will read the documentation and I am not expecting an answer tomy points.
Thank you for your time in reviewing my kata.
Retired.
Hi,
If you're interested in authoring kata, you should read the relevant documentation before your next attempt.
This comment is hidden because it contains spoiler information about the solution
This was really fun to get my head around. Thanks for this solution
Use tr when you want to replace (translate) single characters.
Use gsub when you need to use a regular expression or when you want to replace longer substrings
Why is it best practice to use .tr method here? Thanks for the great submission :D