Ad
  • Custom User Avatar

    Still you need to null-terminate your C-strings when writing to a preallocated buffer.
    Not a kata issue.

  • Custom User Avatar

    I've now corrected the code and it works with the Sample Tests. When I submit it though, one of the fixedTests don't work, even though is exactly the same as one of the Sample Tests. The error I get is: "Caught unexpected signal: SIGSEGV (11). Invalid memory access." (I'm using C, the test is the "abigailtheta" example; all the randomTests pass; the string is null-terminating).

  • Custom User Avatar

    Oh ok, sorry.

  • Custom User Avatar

    Your answers are invalid; they are not composed of consecutive elements of the input array as per the instructions.

  • Custom User Avatar

    I don't get some of the kata test results. For example, this one:

    for strings:
    {"wkmkkddqqvvx", "illpqppnf", "yvvrr", "vvnnyoocffcx", "nnbvtddiirqvv", "ccykkkywwccllr", "kklla"}
    for k = 3, expected:
    "vvnnyoocffcxnnbvtddiirqvvccykkkywwccllr"
    but got:
    "wkmkkddqqvvxnnbvtddiirqvvccykkkywwccllr"
    

    The solution asks for the "first" strings occurring, so why "vvnnyoocffcx" is taken first instead of "wkmkkddqqvvx".
    Or in another test:

    for strings:
    {"uuttp", "ssdoofkkcbbbb", "jjddwrrvrrxhh", "mkeaahhqoxx", "ffbttrrvpno", "llrrkkquumvvxx", "booppvvoo"}
    for k = 4, expected:
    "jjddwrrvrrxhhmkeaahhqoxxffbttrrvpnollrrkkquumvvxx"
    but got:
    "ssdoofkkcbbbbjjddwrrvrrxhhmkeaahhqoxxllrrkkquumvvxx"
    

    Isn't the expected solution wrong? What am I missing?

  • Custom User Avatar

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