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 problem:
Try to refactor your code and remove any mutating method that you called on the object referenced by the input string.
Use non-mutating methods instead and try again.
Hope this works!
Yeah, but the author should clarify this in the prompt..
This test failure is a bit confusing to me, given that the kata description requires that we keep the punctuation in its original location, which is opposite to what this expected value would suggest. It looks like these 'random value' test cases are expecting all the punctuation to be deleted.
Are we supposed keep punctuation in its original location in some situations, but not others?
I'd love to know if there's something obvious I'm missing in my understanding of the problem so I can solve the problem properly. Thanks! :)
TEST:
"Testing for "you're codewars blink, eat jiggery-pokery callipygian four dice in"
It should work for random inputs too -
Expected: "yorue cadeorws bilnk eat jeeggikoprryy caagiillpyn four dcie in",
instead got: "yor'ue cadeorws bilnk, eat jeeggik-oprryy caagiillpyn four dcie in" "
I also solved it right now without problems. Just counting down and check if digits are the same works for test cases but not for attempt cases, if that's your algo
No, theren't any errors in the test.
What is the time complexity of your code?
Read this troubleshooting guide.
This comment is hidden because it contains spoiler information about the solution
Spaces never count, you have to start counting again for each word. And it's been asked and answered before, check the posts below.
It seems as though the tests are contradictory - in some, the spaces are counted (and the letters on either side of the space share the same case), and in others they aren't. I've coded solutions for both scenarios and neither pass all of the tests.