Ad
  • Custom User Avatar

    Kyus are shared across languages, so it's not possible to set a different rank. This kata is very basic and the ranking is fair imo.

  • Custom User Avatar

    I totally agree with you. This one shouldn't be 8kyu. At least not in C#.

  • Custom User Avatar

    Yes, the function is void and the initial code comments are very explicit about the array being preallocated (and it's already declared in the function's signature, it's impossible to allocate memory for it in such conditions). It's important to pay attention to this when solving katas in C. Each language has its own particularities, for some of them like C and NASM, it's better (and recommended) to indicate this kind of details in the initial solution code. The description would become quite messy and unclear if it had to contain all those precisions (consider that there are tens of different languages!). See for example there: https://docs.codewars.com/authoring/guidelines/description

    Sorry for the time you lost, try to be more careful with this from now on.

  • Custom User Avatar

    There is no main function in no kata, why would that be mentioned here?

    This is the initial code for C:

    #include <stddef.h>
    #include <inttypes.h>
    
    void digitize (uint64_t n, uint8_t digits[], size_t *length_out)
    {
      digits[0] = 6; // write your answer to the pre-allocated digits array
      *length_out = 1; // report the number of digits
    }
    

    It does say there the array is pre-allocated, isn't that right? I may be wrong as I don't really know C.

  • Custom User Avatar

    very unfriendly to beginners in C, description does not clearly explain that the array is initalized, lost half a day trying to do malloc on that array, please redo the description for this kata in C, it was horrible, also it is misleading the absence of the main function ( which could also be specified in the description), thanks for your time in creating it, but it just wasted me half a day for nothing.

  • Custom User Avatar

    If sep is not specified or is None, a different splitting algorithm is applied: runs of consecutive whitespace are regarded as a single separator, and the result will contain no empty strings at the start or end if the string has leading or trailing whitespace. Consequently, splitting an empty string or a string consisting of just whitespace with a None separator returns [].

  • Custom User Avatar

    Well I an quite new around here, I don't feel I am in the position to give advices, maybe turn to a moderator around here with more experience, or just make a new kata mentioned in the description of this one or just delete this issue and it's like nothing ever happened:-)). All best wishes man, thank you for creating content. Best of luck in everything you do!

  • Custom User Avatar

    I hope u understand what I was trying to tell you

    I see your solution now, but didn't before.

    Now that I see your solution, I see what you mean. Given the use-case I had in mind when developing this kata, your solution should work.

    While the description does not explicitly state that only "regular" and "super" are supported ball types, perhaps it should.

    EDIT:

    Actually, I think you're correct, given the description. I'm not sure what a good course of action would be in this case, as, here are some of the scenarios I've thought of:

    1.) I could add tests to check that any other argument given is used. e.g. if "bouncy" is given as an argument, then ball_type must be "bouncy"
    2.) I could edit the description to say that only "super" matters, so any other ball type will be considered regular.
    3.) I could edit the description to say that only "regular" matters, so any other ball type will be considered super.

    Any of those three, that I've so far thought of, would potentially break some current solutions.

    Thoughts?

  • Custom User Avatar

    I do, but that's not the issue, this discussion goes nowhere, I hope u understand what I was trying to tell you, thank you for creating content here. Have fun coding.

  • Custom User Avatar

    I notice you do not have a submitted solution to the problem. The viewable tests are optional, and do not necessarily reflect the tests that run upon submission.

  • Custom User Avatar

    Not an issue.

  • Custom User Avatar

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

  • Custom User Avatar

    Can it?

    The description explicitly states, 'If no arguments are given, ball objects should instantiate with a "ball type" of "regular."' And there is a test for that.

  • Custom User Avatar

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

  • Custom User Avatar

    not unique, had similar tasks, nice explanation though

  • Loading more items...