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.
fair enough, sorry about that
I did not have mistake in the code, I have changed my code to use heap allocation, because my solution with static char array was not passing the tests because of the crash caused by hidden free.
OP solved the kata. please come back to close your issues / questions once you found the mistake in your code.
meanwhile, I just added a comment to the solution set-up that mentions allocation / freeing
I just ran the current version of your solution and it passed all tests.
?
Getting crash in C, free(invalid pointer), but I ma not freeing anything and the kata does not ask for heap allocated string.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Self approved after 4 years :-)
Forked and approved
Random tests of all languages do not generate empty strings
this is already handled there
Enabled in this fork
Enabled in this fork
In Python returning -1 is probably less good tnan None.
Loading more items...