Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
your solution writes past the end of the
output
buffer: you are printing a trailing'.'
, and then erase it. this is not robust: the worst-case output size is16
i.e.strlen("100.100.100.100") + 1
, so the caller of the function can expect that16
bytes should be enough, but your solution needs more bytes than that. as a result of writing out-of-bounds, you corrupt the tests suiteI'm using c and I get a weird error:
Your solution has memory leak, expected max length 15 + 1 '\0' = 16.
.I tried printing the length of the problematic result on my pc and it is
15
, meaning16
with the null character.What is the problem?
Very good kata not wanting me to figure out how it works. Only thing is that input and output could have been int array. I didn't realize there were helper functions in the c kata, so I had to use fucking strtok.
Should it really be? I think this is on the easier side of 6 kyu. Btw, g964, very good kata.
This comment is hidden because it contains spoiler information about the solution
They do.
Very nice kata. I think, the tests should contain numbers too, especially since they aren't treated like letters.
Adding strings is very slow. Either use strings.Builder, or allocate a rune array beforehand, since you already know the size.
This comment is hidden because it contains spoiler information about the solution