Ad
  • Custom User Avatar

    The 'ordered' string was probablly malloc'd so i had to put '\0' manually to every position of the string and everything works now.

  • Custom User Avatar

    Please don't spoil the kata. Users are supposed to solve a kata by themselves, not by looking at the discourse page. I marked both answers to this post with a spoiler flag.

  • Default User Avatar

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

  • Default User Avatar

    but still, 7+5+4 is less than 8+7+3.
    again, what's wrong here?

  • Custom User Avatar

    Thanks, totally forgot to allocate more memory.

  • Custom User Avatar

    actual is what your function returned; expected is what it should have returned. The first part of the log just tells you your answer is incorrect.

  • Custom User Avatar

    Im kinda confused, not sure what im looking at here. I pass 18 basic tests and it fails here:

    The expression (as strings) (res) == (sol_res) is false: actual=uhgwaukeiexgqcfvwufqjfeuxmhyhcyqztlpnkivdeatwvdrpihnnahzmdwiviojbzyozfybzyvuhyawvhzxhfviyfgtoubesohqiehgrrpydpjywhusbdaz expected=uhgwaukeiexgqcfvwufqjfeuxmhyhcyqztlpnkivdeatwvdrpihnnahzmdwiviojbzyozfybzyvuhyawvhzxhfviyfgtoubesohqiehgrrpydpjywhusbdazywglphewvlbcpiyfontrrbocyxuzpjmmetnipreksfbgcpbqrughvjjhvtvjrgkloxtddxcvrtathriykdvumtawavesrpceakxdxonnhdwdutrexlnydojeinlorcthme`.

  • Custom User Avatar

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

  • Custom User Avatar

    I jsut solved the kata in C and it seems to behave correctly.
    I'd expect your issue to be related to the result string being incorrectly null-terminated.

  • Custom User Avatar
  • Custom User Avatar

    There seems to be something wrong with the compiler or tests. I ran the test and everything is fine but hen i attemped to solve it the results show some extra words that were never in the "words" string. Tried it on the local visual studio code and it gives the expected solution every time.

  • Custom User Avatar

    My bad. I kept re-reading the description and getting it completely opposite of the description, over and over again.

  • Custom User Avatar

    No, it is fine, why do you say so?

    From the kata's description

    "Success"  =>  ")())())"
    

    S and s are the same letter, ignoring capitalization.

  • Custom User Avatar

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

  • Default User Avatar

    I cannot see the code for test 4 and 5 but based on the error I can know that test 4 failed because the input is an octal number(it starts with zero) and test 5 is missing the last digit when setting the input, so these tests need to be corrected.

  • Loading more items...