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.
Thank you... i wasnt asking for "xor" actualy... i didnt know the operator "^" :D
This comment is hidden because it contains spoiler information about the solution
Could someone explain that?
In my experience O(N * N) is not a best practice, despite the votes.
This code will fail when the owner's name is shorter than the name provided.
Change the while(*name) to while(*name && *owner) and it'll be protected.
As an aside...
strdup
is a POSIX function, not a C function (unless one considers pending TRs). As such, this code will not compile when targeting a non-UNIX environment.be careful with those stack frames :P
UCHAR_MAX is the size of the buffer defined in the test case. Also, it seems like I misread the kata spec. :)
UCHAR_MAX
? You're overwriting something you shouldn't.It looks like the problem might be in the if-statement, the else-clause in particular:
The kata spec requests that vowels' cases be swapped, however the nature of the if-statement in the code does not seem to address the uppercase vowels. Uppercase vowels follow the else-clause, in which case they are only copied, but don't have their case swapped.
Thanks for the report, null_ptr! I'll look into the issue ASAP.
This comment is hidden because it contains spoiler information about the solution
Thanks!
Done... If you have any troubles write again. Now the random tests are without leading and trailing zeroes.
Would it be possible to remove leading and trailing zeroes from the test cases? My solution is producing correct answers, but the random tests keep failing due random leading and trailing zeroes. (seemingly random. spent the last hour or two trying to figure out workaround for the tests without luck.)