Ad
  • Custom User Avatar

    Unfortunately, your new approach runs into a different problem - it consumes all extra spaces between words, which differs in behaviour from the reference solution.

    I think this can be considered a kata issue, and it should be either specified in the description, or not tested at all (I prefer the latter option).

    I guess a third option can be considered: retire the kata. I'm pretty sure it's a duplicate and it's only available in JS, so not much would be lost.

  • Custom User Avatar

    JS - random tests can generate "0-length words" leading to words separated by more than 1 space. I think that such inputs shouldn't be tested, but I haven't checked other languages.

  • Custom User Avatar

    In what language?