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.
OP solved it, closing
If the input string doesn't contain any reference marks, your code just increases
i
until out of bounds.what language, what test?
quite hard to help if you don't give any more information
This comment is hidden because it contains spoiler information about the solution
Figure out what your code is doing in the single case of "aaaaaaaaaaaa". Can you see it is very inefficient? How is it possible to do the same job much faster and quite easily? Then, try to generalize it.
The description says There might be some non-ascii characters in the string., but this actually doesn't apply to C (and knowing this should seriously help you...).
This comment is hidden because it contains spoiler information about the solution
Yes, but there are other small issues with the rest of the code. But worry about that later, and anyway, they should not be hard to find and fix.
It's not that. However, for that I suggest you develop a practice in allocating exactly the amount of memory needed.
And yet, you get a
SIGSEGV
, which is due to memory mismanagement. Which line could it possibly be?Check every line.
Hi, this is literally the same thing the last coder commented on, lol. Anyway, so just take careful note of the comment given in the solution set-up:
Happy coding!
Check your else ifs.
And have you tested your function with negative values?
Read this: https://docs.codewars.com/training/troubleshooting/#post-discourse
Loading more items...