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.
ls.combination(k)
will be empty ifk
> length ofls
. And applyingreduce
on a non-existent element is invalid.Thought I was going crazy b/c it looks good. You've got a spelling error. =]
It looks like you're doing something really weird.
You shouldn't be putting anything into
MORSE_CODE
, the table is preloaded, just use it to decode separate characters.There're aren't two test cases that have the same input but expect different output.
Probably the problem is that CodeWars console output is rendered as HTML, which means, for example, that multiple spaces would look like one when printed.
If unsure, I would suggest wrapping the string being printed in
<pre>
tag or printing in hexlified format.The first question I would ask is why your function returns Morse code while it's expected to return decoded symbols. :)
Nothing to fix, 707 guys passed the Ruby kata.