• Custom User Avatar

    the problem comes from your code, you are not setting the tree_size to 0 for an empty tree

  • Custom User Avatar

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

  • Custom User Avatar

    Thought thare was a C version to play with it since I solved the first one, so I guess I have to wait

  • Custom User Avatar

    Thanks, B1ts, very helpful. I think I misinterpreted the compiler message. I thought that the first string of numbers was the input. I read "equal" as "return".

    Obviously I have to optimise the code a little further...

  • Custom User Avatar

    You haven't shown us what the "random input" is. The first one is your returned result, the 2nd is expected one.

    See: https://docs.codewars.com/training/troubleshooting/#print-input

  • Custom User Avatar

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

  • Custom User Avatar

    I'm too weak, this question is too strong... I can't solve this medium problem... How can I be a real engineer? How am I going to get into google?? KUSOOO :(

  • Custom User Avatar

    I would believe the problem is on your side. Are you sure you return a dynamically allocated buffer every time?
    If you cannot find the problem with your solution, you can post it here (remember about code formatting and spoiler flag!), so we could check it.

  • Custom User Avatar

    In C the Attempt shows an error: Test Crashed Caught unexpected signal: 6

    STDERR says: free(): invalid pointer

    I think it would have passed all test because there was no assert errors and there was a bunch of Test passed text so can't Attempt till this error is solved :(