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! Hopefully I will learn how zo work withthese tasks...
Don't change the method's signature:
Don't create a main method, I already referred you to the docs about that. Also, the starting array being the numbers from 1 to 9 is an example, your function should take that as the first argument. It can be something different too.
Now I wrote a new code to another kata and on purpose very different from the example, but in the output apparently the methods ofthe example code ar exected. I thought, the challenge is to write an own code for solving the Kata? What do I have to do for solving the Kata? :'(
Oh, you're right. I wasn't seeing the correct logs.
Sorry.
You would be correct, however I am saying that when I run your code, I don't see this behavior. Are you sure you aren't misreading the logs?
Here is what I see after running your code a few times:
You may be mistaking the log above the "returned... received..." part as the log for the failed test, but it's not. Note that when you print the values of
arr
, your loop prints one value too many (you're printing a value in memory right after the array), which can lead to confusing looking logs.Sorry. Maybe I didn't understand.
If arr_sz is 19, the arr object will stop at 19, right? So, the expected output can't be 21, because the number is greater than the arr_sz
Is it correct?
I could not replicate this with your current code, but there is no mistake. Your current code doesn't check the last number of
arr
.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Language: C++
Test suit missing the required header
std::list
a little, but too late to make changes
This comment is hidden because it contains spoiler information about the solution
Go translation
removed 2nd condition
should be fixed after 4 years
Loading more items...