Ad
  • Custom User Avatar
  • Custom User Avatar

    Can this kata support C/C++ too please.

  • Custom User Avatar

    I have this issue on my radar, I plan to fix it in upcoming days, but I do not know yet when exactly.

    If you want to tackle it then go ahead, but if not, I will.

  • Custom User Avatar

    there's an issue 3 years down that looks to match. specifically the test gen generates empty (length 0) words and adds spaces between them and then the reference solution is... somehow reading literal spaces out of morse code, because as we all know there are long beeps, short beeps, and spaces. yes. uhm. myeah.

    I'm looking at the "latest" fork idk if it's been modified in-editor since but it has this:

                for i=1, length do
                    if math.random() > .1 then
                        builder:append(morse_code_keys[math.random(#morse_code_keys)], " ")
                    else 
                        builder:append("   ")  -- <-- can happen twice in a row
                    end
                end
    
  • Custom User Avatar

    language used Lua.

    there might be an error in the assert statement of the last random test. the "Passed in:" values versus "Expected:" values were shown in the error/debug message. i'm retyping the values near the end of passed in & expected characters.

    Passed in: W(TW+@GOAPZGM DAN 4.LUF
    Expected: W(TW+@GOAPZGM DAN 4.LUF

    there is a long string of characters before the above, but this part of the string is where i think the problem is. the problem is there are 2 spaces "Expected" before "DAN". having 2 spaces separating eash "word" isn't possible given the instructions & given that there's no morse code for space in the table MORSE_CODE. i saved a screenshot but idk if we're allowed to post an image link.

    edit below:

    this is my first time posting so i didn't know that the format wouldn't be wysiwyg based on how i typed it so i'm retyping the critical part here.

    Passed in: W(TW+@GOAPZGM_DAN 4.LUF

    Expected: W(TW+@GOAPZGM__DAN 4.LUF

    this single underscore before "DAN" in the "Passed in" represent single space. the double underscore in the "Expected:" represent double spaces.the assert is expecting a double space before "DAN". how is this possible given the instructions & no morse code for space?

  • Custom User Avatar

    Groovy translation that also orders the list of how to access the dictionary/hashmap/etc. in each language alphabetically

  • Custom User Avatar

    Wish spaces were encoded my the morse code...

  • Custom User Avatar

    Kicking myself for not putting the even/odd list on the return line...

  • Custom User Avatar

    the idea is sweet, but thetesting is quirky.

    1. if there are only 2 characters, it isn't logical there's a space in between, but a 2-character word.
    2. some letters are a longer variation of others: - T, --- O ; . E, .. I, ... S ;
      normalizing signals should take in consideration one might appear as another.
    3. padding with 0s before and after is irrelevant. code could trim it, but a signal starts with a signal, not not-signal.

    there should be a convention of how to start messaging, orregarding message requirements.

  • Custom User Avatar

    got that too in python.
    i print the message before returning it, and it's the same.

  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    nope, the problem description includes this:

    Assumptions

    • You can assume that you are only given numbers.

    if we're ever passed a list that includes non-numbers, it's the code calling our function that's breaking the contract, not us

  • Custom User Avatar
  • Custom User Avatar

    Didn't we have to consider that array element could be not a number?

  • Loading more items...