Ad
  • Default User Avatar

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

  • Default User Avatar

    I agree wholeheartedly. Nevertheless, the satisfaction rating is 54/116. It must be a puzzle and not an algo kata.

  • Custom User Avatar

    A recent update has been published which fixes this issue ^^

  • Default User Avatar

    I also have information about using rspec, but it don't work. I can't use the MRI 3.0 - it's unavailable in menu

  • Default User Avatar

    The kata is not broken. You just pass the key somewhere not to the hash but to the symbol, because there is no key in the hash and the value of that symbol is finite, respectively, you need to return the default value there. You need to add either a hash check or rescue default

    By the way, a small number of comments (regarding the number of those who decided) is almost always on the contrary a sign that there will be no problems with the kata, you can say this is a clear sign of the mediocrity of the kata. A large number of comments are usually just in broken kata or in very complex or unusual kata

  • Custom User Avatar

    Reraised as issue, but if you click attempt the tests will appear.

  • Default User Avatar

    The kata includes only integers so you shouldn't need floats hence no rounding is needed and no expectation has to be mentionned. If you are using floats it is your problem:-) Cheers.

  • Default User Avatar

    Yes, the lua reference solution is actually wrong. I'll raise an issue.

  • Default User Avatar

    Lua.

    My answer is lies in an array b, so the return value is table.concat(b)

    Last two lines of the code:

     print("answer = " .. table.concat(b))
      return(table.concat(b))
    
    

    what I get:

    Log:

    answer = dmkyeCSddyGacrHsmufzNtbxrWihibkCxgdzyqpgAqdnk

    and

    Expected objects to be equal.
    Passed in:
    (string) 'dmkyeCSddyGacrHsmufzNtbxrWihibkCxgdzyqpgAqdnk'
    Expected:
    (string) 'dmkyeCSddyGacrHsmufzNtbxrWihibkCxgdzyqpg-aqdnk'
    
    

    The answer seems to be correct, but the random test tests my answer against an incoorect value - the result string can't have dashes

  • Default User Avatar

    same thing. all the tests work, but random test fails for some reason, as if it expects the output to be the original string

    Passed in:
    (string) 'jXhvjapjGxLambXinoLrbvevsmLiFtcrtoBqtoLqpmmtifg'  
    Expected:
    (string) 'jXhvjapjGxLambXinoLrbvevsm_liFtcrtoBqtoLqpmmtifg'
    
    
  • Default User Avatar

    Right. Sorry, I didn't see these comments until now. At the beginning of the initial Lua "solution" I am adding:

    "-- In random tests it can happen that there is a trailing white space".
    Thanks for your posts.

  • Default User Avatar

    It seems the random tests sometimes add some spaces at the end.

    In:

    Passed in:
    (string) 'si LWENLYCCWVTH dfngdv'
    

    I don't see additional spaces.

    Should we deal with additional spaces, too?

    It's up to you:-) Lua translation was passed by 13 people (not many but not bad for Lua) and nobody complains... Since you passed you can look at the tests to see if there are sometimes additional spaces and to look at others' solutions.

  • Custom User Avatar
    GetVolumeOfCubiod  old
    GetVolumeOfCuboid  new
                  ^^
    
  • Default User Avatar

    fixed, but please specify the language next time, it was C# ;-)

  • Custom User Avatar

    I've asked Hobovsky on Discord, he approved it and it seems fine right now. Can you confirm it's ok?

  • Loading more items...