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.
Yeah, I regret writing that translation. The problem with letting the user return nested pointers like
char **
is that in good logic they should then also write a corresponding custom freeing function, e.g.void free_words(size_t n, char *words[n]);
. But then many users would just leave it blank, because the tests would not check its correctness (it's not impossible to do so, but it is very cumbersome and clunky); so it would make for an awkward kata that asks to write two functions but can only reliably test one of them.I don't like how this kata enforces a specific memory layout of C strings. If it wasn't so strict I could have just stored them back to back in a single allocation and just used the strtok output. That would have been nice