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.
This comment is hidden because it contains spoiler information about the solution
Also, the amount of spaces required will differ from the original text. If you want a safe allocation, we might need to alloc (2 * strlen(text) + (strlen(text)- 1))). Because for each possible letter you are allocating 1 extra byte for safety, and 1 extra byte for space, excluding the last char(hence strlen(text - 1)). In case the string is, for example "Abcdefghijklmonpqrzx" - no spaces at all, and letters that do consume 2 bytes - this will work, whereas allocating for strlen(text) wont.
strrev does not exist, thus code does not work if n exceeds 26 with lower case values, will overflow the char
you make 2 allocations, thats not really usefull
you should use 'a' and 'z' instead of 97 and 122, because those values does not mean anything when we read them
This comment is hidden because it contains spoiler information about the solution
if arr_size equals 0, your size_t underflows and you might crash
tho the for without a first argument is disgusting
This comment is hidden because it contains spoiler information about the solution
easy to make it crash