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.
Thanks a lot! I have misunderstood the use of malloc with strings, what caused problems in other katas as well. How stupid... Now i learned something. Thanks again...
there is no problem with the tests, they simply cannot be expected to work correctly when the user's code contains undefined behavior. the "my code works if I remove/add a printf()" phenomenon is a very common effect of UB
As B1ts said above, you're not allocating enough memory.
sizeof(str)
is the size of thechar *
pointer (8 bytes on a 64-bit machine), not the number of bytes in the stringThat is strange behavior indeed. I don't know what's the problem with the tests, but one problem in your code is that you don't allocate enough memory.
This comment is hidden because it contains spoiler information about the solution
i already told you why below, you replace the newline characters for no reason , the description does not ask for this
This comment is hidden because it contains spoiler information about the solution
You just have to consider what the specs are for this kata. The degree to which 'y' is used as a vowel depends on the rules of the spoken language.
didnt realize i had editing rights, done
in JavaScript, assertio messages are truncated;
chai.config.truncateThreshold
should be set to0
why do you replace the newlines ? the description does not ask this
If you can paste your code here and mark as spoiler I may be able to help out.
I have an absolutely correct solution for the tests, but it gives an error, what's the matter?
expected 'N ffns bt,\nYr wrtng s mng th wrst '…' to equal 'N ffns bt,\nYr wrtng s mng th wrst '…'
Haha, I did the same and through breaking down my code line by line on CGPT it was mentioned the code actually evaluates to the last value 'u' due to the way the comma operator works in JavaScript but I didn't bother to do an array like you did.
Simple, yet efficient. I like!
I need to remember RegEx exists...
Loading more items...