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'm not sure if it's in the scope of the kata. the description says:
I just added better messages to the C version and i saw that the reference solution cannot handle empty strings / strings consisting entirely of spaces
unclear issue, and 1,000+ Go completions
This is not an issue, this is a question ;-)
Your code is incorrect and you have to debug it
I see several mistakes :
"a b"
malloc(256)
) without being sure it will be enough in the worst case scenariowords
is apointer to a char array of length len
you allocate the size of an
array of length word count of array of length len of char
also note that you forgot to add +1 for the nul terminator
Your approach is too complicated. You dont need to allocate a 2D array to store every word. You can solve this in only 1 pass of the input string, keeping track of the current longest word as you go
same here.
"
The expression (as strings) (res) == ("taxi") is false: actual=
taxi
expected=taxi
."
In C i've get random tests passed, but only 1 line is breaking and i dont understand why...
Spoiler flag for explanation to a question in solution right ?
yes
You sure it's 7kyu for C ?
Don't give free hints and let people solve the kata by themselves, that's part of the learning process, just like it has been for you. I marked your message as a spoiler.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
if function is returning non void type (int , char , whateva) than compiler will generate an error if it meets end of the fucntion "}" without return statment