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
do_test("When you in order to do something by a wrong way, your heart will missed somewhere.", 2);
is this test correct for C?
should the expected value be 4?
Yes. No. It depends. In many languages it is, and, what's most important, description explicitly, clearly specifies that it is.
Y is a vowel? :(
would be better to rename to some imaginary city.
Quite misleading description. I wonder why its not been taken down.
@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!
my appologies:
I am using C.
The output shows that it EXPECTS that strange sequence {30, 10, 15, 20, 25} and MY program has OUTPUT as {5, 10, 15, 20, 25}
I will have a look at the page.
Thank 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
Unable to understand how it got this answer:
expected:
{30, 10, 15, 20, 25}
but got:
{5, 10, 15, 20, 25}