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.
I guess the problem may come this line :
long long** result = (long long**)calloc(row, sizeof(long long));
try to declare result as :
long long (*result)[2] = calloc(row, sizeof(lst[0]));
You are using calloc, which guarantees zeroed memory, however, you are not leaving any room for the null termination. strcpy will not care that you have allocated 1 byte too little and will overwrite whatever is after that piece of memory you just allocated. This is a serious problem! Always use strncpy. However, in this case, strncpy would have refrained from null terminating your string, instead leaving you with an unterminated string for all your printfs and your zero termination check. That this passes the tests is more because the tests are bad rather than that your code functions correctly.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution