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.
Nested loops are what cause the O(n^2) behavior!
I suggest looking up "memoization" and seeing if that coding practice can help eliminate the need to do multiple passes over the list in question. :)
I get an error on ~1.86M, so it is bigger then 1.5M
It's 2M if you are lucky.
Why would one except that negative n has to produce negative results? How does it fit the definition of Fibonacci numbers?
Theres a hint at the bottom which points to a hint on calculation of terms with negative indices.
For python it's ~1.5 mil, don't know about JS (probably similar)
What is the biggest number in the tests?
you are possibly printing a lot. if so, silence the print statements and try again
Program is throwing error:
Max Buffer Size Reached (1.5 MiB)
Last attempt of array ([13,3,1,1,1,1,1,1,1,1,1,1,1,1...] , 13) does not complete;
me too!
This comment is hidden because it contains spoiler information about the solution
Hi awesomead, I have made a change that should fix everything. Please try again when you get a chance, thanks.
awesome!
Thank you very much for your quick response. I had written that part and when I wanted to rewrite it, I just deleted without writing it new.
So I thought I considered everything and it seems that then my frustration made me blind.
Now it works!
Hello, I just wanted to ask how trustworthy are the tests in JavaScript?
More than one time I've seen tests like the one beneath.
Alice has no valid word in her memory, however Bob does - namely
heme
.My code finds this word and therefore the winner is
1
(Bob). The test however claims that-1
is the correct result.Either the tests are heavily unreliable or i misunderstood the Kata completely.
Thanks for help in advance!
Loading more items...