Ad
  • Custom User Avatar

    I ran into this same issue. The initial tests were passing, but the random tests on submission were failing. From printing out the input text and my text after I had parsed the input into words I found an incredibly subtle bug in my approach where I was removing a couple of characters from the words by mistake.

    If the random tests are failing with incorrect expected word counts, there's something wrong with your approach to parse the words from the random input text.

  • Custom User Avatar

    Hello,

    Everything you need is as described

    yup

    random tests include some additional combinations with punctuation characters between random character words that I don't think are explicitly mentioned

    actually, all you need is in there. If you encouter troubles, that only means you didn't pick the right tool or the right approach to perfectly fit the description.

    Since you can't see the exact strings that are used

    you always can: System.out.println is the tool, as you just did and mentionned. ;)

    Well done for the completion & cheers :)

  • Custom User Avatar

    This is the most difficult kata I've tried so far. Everything you need is as described, but the additional random tests include some additional combinations with punctuation characters between random character words that I don't think are explicitly mentioned in the instructions. Since you can't see the exact strings that are used for these additional random tests, the only way I could work out what they were looking for and what I was missing was to add System.out.printlns to write out the input text and the output of my solution at various points to work out what was wrong.

    I think this kata can be improved if the wording is updated to reflect the different types of input in the random tests that otherwise are a black box and make it more difficult to get a working solution. Otherwise it's a challenging kata for sure.