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.
.
glad to see you guys will actually kick someone for mid like that
now, click on the pseudo of the user and guess what happened to him... ;)
There is no way I can accurately convey how sarcastic I am when I say this, but GOOODDD JOOBBBB.
Props on being clever and finding a way around the test environment. But at the end of the day the challenge wasn't pass all tests no matter what. It was pass all tests by righting an algorithm that does X.
That actually does clarify it very much, yes! Thanks @MattZ306 and @Chrono79
Hey pinkston. Here's a demonstration for why you usually don't want to mutate an input array:
You can see that if you change the contents of "randomArray" in your solution, the validator that checks your solution won't be running on the same input. Since you never really know if the test case is made this way or not, it's just safe to assume that it is and keep the original array untouched.
Hope that resolves your confusion! :)
Because you never want to mutate the input unless you definitely know that it won't lead to any unexpected behavior.
Thanks! That fixed it. Could you elaborate a bit on why I should not mutate an input in a situation like this? And, if you really wanted to make a kids day maybe provide an example of when one should and shouldn't mutate an input?
No need to teach a hole class, a link to someone already explaining or a phrase to google works plenty fine.
Will mark this question as resolved shortly regardless
Don't mutate the input.
This comment is hidden because it contains spoiler information about the solution
edit
use rather something more appropriate... ;)
do I have to create a custom List class with a modified getitem method?
Nevermind, I figured it out, I was over complicating it. Loop was the solution. Thanks for the advice!
I really can tell much more without spoiling the solution, read what you have to find in the instructions, think about how are Fibonacci numbers changing and it'll come eventually.
Loading more items...