Ad
  • Custom User Avatar

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

  • Custom User Avatar

    yes, marking it as having spoiler content

  • Custom User Avatar

    Hi! Thank you!

    • We have a vocabulary with 1 or 2 characters? - No, the minimum length of a word is 3.
    • Or the vocabulary is too long? - No, the edge tests are not too long:
    describe("New Edge", function() {
        let a = [
           "fye*** w*eg **e ***z* ***s x*e*fg *****v eee*eu i** ***re **g*t* *e*", 
          ["eggete","fefffv","eeeeeu","fyefee","wfeg","iee","eefs","hee","hfe","efere","gegzf","xgeffg"]
          ];
        it(`given ${JSON.stringify(a[0])}, ${JSON.stringify(a[1])}`, function() {
        assert.strictEqual(isValid(translate(a[0], a[1])), "fyefee wfeg hfe gegzf eefs xgeffg fefffv eeeeeu iee efere eggete hee")
       });
    })
    

    Post your solution here, if you want (marking it as having spoiler content) and we can try to find the error

  • Custom User Avatar
    • Your car 'c' on main road correctly gave way to 1 car 'A' entering from side street.

    • The next car 'd' on main road should have done same, but it did not.

    So you did not follow the rule of Kata descriptio:

    Assume every car on the main road will "give way" to 1 car entering from each side street.

  • Default User Avatar

    Same for me, this message drived me to my solution ! So it's somewhat a spoiler, but I don't tag it as it is more a helper ;)

  • Custom User Avatar

    Thanks for completing my friend!

  • Custom User Avatar

    Maybe there could be some helper function that takes a message polynomial and prints the expected EC numbers (maybe even each step)? IDK if this could be used to cheat calculating it though.

    Exist some idea or how to know how many Steps most to calculate for one Polynomial?

    It should always be 8 steps.

  • Custom User Avatar

    How would you solve that? I can't think of a good idea tbh

  • Custom User Avatar

    That is really strange, you aren't even calling htmlize, are you?

  • Custom User Avatar

    You were right, I fixed both things. Feel free try to ask again, if possible under the other kata, otherwise I get confused :))
    Have a nice day

  • Custom User Avatar

    Good job, thanks for completing, now you could try creating a QrCode! :)

  • Custom User Avatar

    Try googling "Big O notation" (it's a long subject to explain it here), your code should work in linear time. Your current code has a loop and a loop-alike method inside, that's quadratic in time.

  • Custom User Avatar

    Your code's time complexity is O(n2) that won't work here. You code's time complexity should be O(n) to pass.

  • Custom User Avatar

    When you post solutions or even half solutions, mark your post as having "spoiler content" next time. I've already set this one to spoiler.

  • Default User Avatar

    Just sounds like you are trying to manipulate an empty string? you are probably trying to access the first letter but since the string is empty you get an index out of range