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.
sample tests are the same across languages
Yes. No. It depends. In many languages it is, and, what's most important, description explicitly, clearly specifies that it is.
@arif-umer78
your code is looping one time too many, and thus writing to memory it should not write to. it happens that in the sample tests, your array is located just behind the reference one in memory, so you are overwriting the expected array
It's possible there is an issue with the tests logs, but I am not sure. I left a message to the translator.
No need to apologise, and you're welcome -
I don't use C but I noticed that a Codewars power user, akar-0, is currently looking at your issue with the C translation and he will see if there is an issue with the C translation of this kata.
The page is a useful resource in general, but in this case it might be indeed a problem with the kata not you!
I can't see which language you are working in - in general it always helps if you state which language you are working in so users can troubleshoot your issue.
In Python language tests, there is a case with input
integer = 5
andlimit = 25
which is expecting the correct result to be5,10,15,20,25
.Are you sure that your code is producing
{5, 10, 15, 20, 25}
or is your code producing{30, 10, 15, 20, 25}
(which is the wrong answer)?By the way you can read this useful page for help with troubleshooting such messages if you're unsure:
https://docs.codewars.com/training/troubleshooting/#error-messages-and-printing-your-inputoutput