Ad
  • Custom User Avatar

    I didn't see the middle check ...

  • Custom User Avatar

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

  • Custom User Avatar

    Given a 2D array of some suspended blocks (represented as hastags)

    I'm assuming the description is supoosed to read hashtags, not hastags.

  • Custom User Avatar

    Why use the term whitespace when only space is used?

    Applies to the C-version.

    I could have tagged with issue, question or suggestion for that matter.

  • Custom User Avatar

    C tests seems to be broken. No matter what I return it's a success. It's working for "attempt"

  • Custom User Avatar

    Yep, it looks like it should now!

  • 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
    

    attempt-samples

    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

    sample_test(((bool[])
    	{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.

  • Loading more items...