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.
The memory model of this Kata is unclear. Is the user solution supposed to dynamically allocate memory for the returned string? If so, why isn't the resulting buffer freed after performing each assertion?
In order to fix this issue, I would strongly recommend the function signature to be modified such that memory is managed by the caller and the callee only has to write to the output buffer provided to it as an argument, i.e. something like
void solution(..., wchar_t *out)
.Sorry if this is a stupid question: Is there any way to determine from the instructions what the expected output is for any given input, or is the intended solution for people to copy-paste the code from the linked Wikipedia page?