Ad
  • Custom User Avatar

    That's an invalid input, and you've been told what to do with that:

    Return nil (or your language's equivalent) for invalid inputs.

    Not a kata issue.

  • Default User Avatar

    For C there is a test with count == 0, but the instruction was clear "the array can't be empty".

  • Default User Avatar

    Instructions are unclear

  • Custom User Avatar

    done

  • Custom User Avatar

    Your code fails to handle cases with leading zeros (042). Your code outputs 43 while the desired output should be 043

  • Custom User Avatar

    Your code fails for two reasons:

    • Failure to handle cases with leading zeros (042). Your code outputs 43 while the desired output should be 043

    • Failure to handle big arrays (will result in Integer overflow if the merged value in the array is > 2147483647 which is the upper range of int)

  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar

    Think of it as a list of single-digit positive numbers separated from an integer. The output should be derived from merging them, incrementing the number by one and then separating each digit in the form of an array.

  • Custom User Avatar

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

  • Default User Avatar

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

  • Custom User Avatar

    For C, the Attempt tests seem broken.

    The following test I return *count = 0 and return a pointer to a zero-sized buffer ("RETURNING NULL").

    1 2 -1

    RETURNING NULL <-- my debug code

    There are other tests that hit this code that accept this value, but this one doesn't. Seems like bug.

  • Default User Avatar

    This kata looks straightforward initially but then you find out some clever constraints.

  • Custom User Avatar

    Did you ever get this work? I'm having the exact same problem in C. I tried returning NULL as the function's return value as the test indicated, but that didn't work. Then I turned the bad entry into a 0 (NULL), but that didn't work either.

  • Custom User Avatar

    these test cases are dog

  • Loading more items...