6 kyu
Networking 101/4: Determine the IPv4 network prefix in CIDR notation
54 of 139bitcanon
Loading description...
Networks
Bits
Fundamentals
Binary
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Great kata and series to learn something new on computer programming.
Thanks Donald, it was an issue that I failed to spot, I have taken another look at it and found it.
This kata is timing out on simple sscanf/sprintf solutions which for this rank should be sufficient or are further optimisation needed?
This Kata has no performance requirements as far as I'm concerned so probably an issue in your solution, such as an infinite loop. Re-raise this as a Question (the "Issue" tag is reserved for confirmed issues with the Kata itself), post your current solution as a spoiler and we can take a look.
https://docs.codewars.com/languages/c/authoring/memory-management-techniques/#mixed-approach-malloc-in-the-solution-and-free-in-tests
Performing heap memory allocation in the user solution and freeing the memory in tests is an anti-pattern that should be avoided at all costs. Please change the semantics of the user solution to either:
A recommended function signature:
Alternatively, return the output buffer
result
as well but this needs to be explicitly tested and documented:Thanks for you input, I have changed the source code as well as the description to use the
void
approach instead.