Ad
  • Custom User Avatar

    ls.combination(k) will be empty if k > length of ls. And applying reduce on a non-existent element is invalid.

  • Default User Avatar

    Thought I was going crazy b/c it looks good. You've got a spelling error. =]

  • Custom User Avatar

    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.

  • Custom User Avatar

    The first question I would ask is why your function returns Morse code while it's expected to return decoded symbols. :)

  • Default User Avatar

    Nothing to fix, 707 guys passed the Ruby kata.