• Custom User Avatar

    Doing the C version.

    For a level 7 kyu kata, it would be nice with something in between

    The test-samples

    x 2 y 1 z 1
    x 1 y 2 z 3
    x 2 y 2 z 2


    x 63224 y 56743 z 12581
    x 48848 y 38254 z 26413
  • Custom User Avatar

    I respectfully disagree.

  • Custom User Avatar

    Doing the C version.

    What excactly is passed on to the testfunction? Pointers to strings? Pointers to arrays of strings? Pointers to pointers? Does it say so anywhere?

    Based on the description of the task I would expect to get two pointers to strings, and return -1, 0 and 1 depending on which string should be first. But I don't get that.

    This is a kyu 7. Specific instructions expected.

  • Custom User Avatar

    I was expecting the supplied data not to be mutable. But as I wrote I'm not sure how it was intended.

  • Custom User Avatar

    For the C version.

    The function is defined as

      size_t how_many_gifts(unsigned max_budget, size_t length, const unsigned gifts[length])

    However, the data pointed to by gifts is still mutable, i.e you don't need to make a copy in order to sort.

    Marked as issue as I'm not sure what was intended.

  • Custom User Avatar

    I'll just point out that imul can't correctly multiply uint64_t. Not that I believe really larges values has been used here.

  • Custom User Avatar

    Doing the C-version.

    I'm curious if I understand this correctly.

    the second testcase shows this :

    Test Passed
    for initial state:
    {0, 0, 1, 1, 1, 1, 1}
    after 5 iterations, expected:
    {1, 1, 1, 0, 1, 0, 1}
    but got:
    {0, 0, 1, 1, 1, 0, 1}

    When I print out the parameters, len is 5 and n is 5.

    When I look into the testcase source, the array being tested is

    	{0, 0, 1, 1, 1}),
    	5, ((bool[])
    	{1, 1, 1, 0, 1}

    What I don't understand is the len passed on to my program is 5, then len of the source code is 5, but the code testing it displaying the error is using a length of 7. I believe the error messaging/printing might be wrong.

  • Custom User Avatar

    Very nice kata

  • Custom User Avatar

    One could point to the fact that integer is not a datatype/keyword in c, whereas int is. As it reads "each argument is assumed to be a non-negative integer" it's certainly not telling you which int is in use.

  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    Maybe add "puzzle" to the description. I'm not sure "basic language features" and "fundamentals" is suitable to describe this kata, as C does not have any generic datatype.

  • Custom User Avatar

    What excactly does #include "solution.txt" do? Is it documented somewhere?

  • Custom User Avatar
  • Custom User Avatar

    Doing the C version.

    It's fine this is being a kyu 7 puzzle, but no feedback at all?

    Test Results:
        That's not the flag

    Is "That's not the flag" an error message, or what you're supposed to find?

    Labeling it an issue because it's not clear what's being returned.

  • Loading more items...