Ad
  • Custom User Avatar

    Every kata involving strings is at least 6kyu in C.

    A user made the nice effort to group all 8kyu C katas together according to a C introductory book. Maybe it can help you find good actual beginner level kata: https://github.com/darrellroot/Computer-Science-Education-Resources/blob/main/Codewars-Problems-By-Stephen-Prata-Chapter.md

  • Custom User Avatar

    Fixed.

  • Custom User Avatar

    The issue should be fixed. float is not used anymore, it was replaced by double.
    Please verify.

  • Custom User Avatar

    Thats deliberate. Both const mean something different.

  • Custom User Avatar

    you are not removing the trailing newline. please double check everything before blaming the tests suite ...
    also, this line makes no sense:

    s[strlen(s)] = '\0';
    

    by definition s[strlen(s)] is already '\0'

  • Custom User Avatar

    Are you sure the ending on your string is right? I mean, there is no "\n" there?

  • Custom User Avatar

    First of all, congratulations on solving!

    Secondly, I can't look at your solution since I have not solved it in C (other people's solutions are only visible to you, if you have solved in that particular language).

    My best advice now would be, especially if you are a beginner, to look through the other solutions in C language and study them - you will notice quickly which users are advanced/proficient and you can try to "reverse engineer" their logic, their approach etc. This is the most valuable feature of Codewars in my opinion.

    Also, you can join the Codewars discord (link is on left sidebar of your screen). There are dedicated channels, including for C, so you will be able to discuss directly with people if you'd like some suggestions - you should not post spoilers there directly, but if you ask "can someone look at my solution and give comments please" with a link to your kata solution, it should be OK.

  • Custom User Avatar

    Hi and welcome to Codewars;

    You have to know that Codewars ranking system is shared across all the languages on the platform, ranging from JavaScript/Python to things like C, NASM, Lambda Calculus (!) etc.

    When katas are approved, this variety of languages is taken into account. However, some tasks which may be difficult in one language are trivial in others and vice versa.

    This kata for example is very simple in such languages as Python, but I presume may be more complex in C (which you seem to be working in). However you will find in your Codewars journey the reverse situation also; performance/calculation katas that are maybe easier C but very slow in high level languages.

    I hope that helps explain a bit.