• Custom User Avatar

    as of now the initial code in C# compiles and runs, so it seems this suggestion is no longer relevant

  • Custom User Avatar

    the OP was talking about Go. the only Go version on Codewars as of writing this is 1.20, so this is no longer relevant; and it was not a kata suggestion but a hint to begin with

  • Custom User Avatar

    Reference solution was wrong for trailing dots. Added some more test cases and approved.

  • Custom User Avatar

    Added some more tests and approved.

  • Custom User Avatar

    your code assumes that the input string at most 14 characters long. it returns false positives for leading/trailing whitespace and + signs. it crashes for "..." as strtok("...", ".") returns NULL.

  • Custom User Avatar

    I completely overhauled the C test suite. I replaced the reference solution, as it was wrong for several kinds of invalid inputs, e.g. ".1.2.3.4", "1.2.3.4.", etc.

  • Custom User Avatar

    approved (note: i can't mark this as resolved by myself)

  • Custom User Avatar

    You can try again, I added failure messages for users who did not buy the paid subscription.

  • Custom User Avatar

    No, everyone can see failed test cases for free. Usually tests show them, but if they don't, everyone can use print to see them.

  • Custom User Avatar

    No, codewars red people don't get anything like that. You can always just print the input to see what it is.

  • Custom User Avatar

    Time: 487ms Passed: 336Failed: 2Exit Code: 1

    Let me guess. I only see the failed cases if i have a paid subscription?

  • Custom User Avatar

    Closing as this isn't an issue.

  • Custom User Avatar

    I don't think the description means that these IP addresses are invalid across the board. I think it means to consider them invalid for this task, which is perfectly fine. Typically when IP addresses are displayed in any system, they are displayed without leading zeroes. This task is likely trying to recreate that, even if the leading zeros aren't "wrong".

  • Custom User Avatar

    The question seems to misunderstand some IP address concepts. For example, 12.34.56.00 is a valid IP, leading 0s are absolutely fine (although unnecessary), and a few other things. Because of this, I don't think there is any "best practice" for this question and it could be teaching bad practices in terms of IP address validation.

  • Custom User Avatar
  • Loading more items...