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

    This comment is hidden because it contains spoiler information about the solution

  • 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

    I was printing out the input to see what they look like before putting them into MORSE_CODE.
    I realize that two of the test cases have same input but different output? instead got: ". ." is the input from the test cases.

  • Custom User Avatar

    Could you please clarify your question? It's unclear what's happening.

  • 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.

  • Default User Avatar

    Guys, what does (!) 3 mean? I got that when I ran my attempt

  • Custom User Avatar

    Expected: "EE", instead got: ". ."
    Expected: "E E", instead got: ". ."

    How can we acheive this when both inputs are exactly the same...

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    One of the ruby test case has 53 legal characters but it expected 56. Can someone fix those testcases.