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.
almost assembly
C: the return type should be
void
.here: https://www.codewars.com/kumite/62b842a1761397001b0a10ed?sel=6303b40335735b04ed35a090
This comment is hidden because it contains spoiler information about the solution
i thought about that. the main reason i decided to translate it anyway it's because in the other traslations they never test with more then 1 string concurrently (which might be a mistake) - so the behavior here in C is the same.
the second reason it's beacuse 'under the hood' all the dynamic languages uses some sort of caching for the context of the dynamic functions, and in C you can do the basic of this with static variables.
C translation (author inactive)
✔ changed any to Any
more specifically i think it should be
Any
(capital A) fromtyping.Any
C translation (author inactive)
thanks. added sample_tests, moved fill_rand_arr to the tests.
This comment is hidden because it contains spoiler information about the solution
thanks.
i get it.. but the thing is i want the user to tell me the length of the output so i can test with his length, and doing that without a struct it's a bit messy:
also i dont want to tell the user somehow the expected lentgh.. i want him to malloc himself the new array..
that being said i will have to pass the output array as pointer to a pointer:
and that makes it more confusing.
so in my opinion the smooth way to do this in this case is like
trashy_incel
wrote:i think it's a common practice in C to pass structs as pointers.
This comment is hidden because it contains spoiler information about the solution
Loading more items...