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 get the same thing
Thank you.
Of course. That makes sense :-)
int* lg
is a pointer for returning the output array size.Allocate memory, fill up the array with correct data, and return it.
I'm trying Directions Reduction kata in C but I'm still new to this language.
On this line:
char** dirReduc(char** arr, int sz, int* lg)
what is the "int* lg" for?
And how do I return the array at the end?
I'm creating a new array, allocating memory, placing the answers in the slots but when I return, the program's console tells me my array is empty.
I tested this solution outside codewars and in seems to work.
Thank you
This comment is hidden because it contains spoiler information about the solution
Sobaki pizhe())