Ad
  • Custom User Avatar

    @YiyangLi The test is correct, please read the kata description carefully for SOS code description.

  • Custom User Avatar

    @jolaf please take a look again the test case in JavaScript, the length of the morse code in the case SOS is 9, without any delimiter, each position is either dot or dash. I think '', an empty string, is the correct answer, but it expects SOS.

  • Custom User Avatar

    When you handle SOS, you use a special character · instead of conventional dot ., that's why it doesn't match.

  • Custom User Avatar

    Could you please be more specific? What exactly were you doing and what went wrong?

    Plesae note that unfortunately, CodeWars test output is HTML. So it hides extra spaces, for example.

    I suggest doing the following in your code when printing anything, it could help:

    print "<pre>" + repr(output) + "</pre>"

  • Custom User Avatar

    Well, what's the specific part you don't understand? The description is pretty clear. In the first example we have enough ingredients for two cakes. In the latter we don't even have apples, so there's no way we can bake even one cake.

  • Default User Avatar

    No, it's correct. I think you're confusing permutation with variation. When doing permutation you only rearrange the items, so you can't use an item twice.

  • Default User Avatar

    What special cases are you thinking about?

    I'll think about error checking but I don't want to bog the problem down for beginners with error checking.

  • Default User Avatar

    Good to know. Thanks so much for the info!

  • Custom User Avatar

    There's no way to do that without breaking existing solutions.

    Honestly, I don't feel that this kata needs it. It's a rather simple kata, adding edge cases and case-sensitivity in doesn't improve it.

    I think you should leave it as is.

  • Default User Avatar

    Thanks for the feedback! I'm new to making katas, so is there a way for me to make these changes without breaking everyone's solutions?