Ad
  • Custom User Avatar

    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!

  • Custom User Avatar

    Yeah, but the author should clarify this in the prompt..

  • Custom User Avatar

    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" "

  • Custom User Avatar

    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

  • Custom User Avatar

    No, theren't any errors in the test.
    What is the time complexity of your code?

    Read this troubleshooting guide.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Spaces never count, you have to start counting again for each word. And it's been asked and answered before, check the posts below.

  • Custom User Avatar

    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.