Ad
  • Custom User Avatar

    Yes, not easy to understand fully but maybe it is for that reason that the moderators gave a 4 kyu...
    Be sure that there are no errors in the tests.
    1:uuu and 2:sss have same length, s comes before u but 1 comes before 2.

  • Custom User Avatar

    This method (repeat) has been added to the ECMAScript 6 specification and may not be available in all JavaScript implementations yet.

    Maybe it is for that reason?

  • Custom User Avatar

    Per the standard described, dash is 3 time units long and pause between dots and dashes in a character is 1 time unit long. So 11111100111111 look like absolutely correct M, with rate 2. Hmm?

  • Custom User Avatar

    You're welcome! Feel free to ask. :)

  • Custom User Avatar

    Well, in fact, no reasonable algorithm for this kata should take seconds to complete. If this happens in your case, you're doing something really, really weird.

    By the way, you can always print the input data of your function to see what the tests are and investigate why their analysis is taking so long.

    Also, after you've managed to pass some of the tests, you may use temporary "shortcuts" in your solution, like "if the test input is this, return that" so that you can move to investigating what is the problem of your code with the next test.

  • Custom User Avatar

    That happens here on CodeWars from time to time. Try reloading the page first of all.

  • Custom User Avatar

    I had the same issue at first. You'll need to comb through the description to find what you missed. It has to do with the fine print around the effectiveness of type versus type.