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.
@YiyangLi The test is correct, please read the kata description carefully for SOS code description.
@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.
When you handle SOS, you use a special character
·
instead of conventional dot.
, that's why it doesn't match.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>"
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.
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.
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.
Good to know. Thanks so much for the info!
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.
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?