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.
Hi eldesanclemente! I think you can try the "divide and conquer" fib algorithm. The recursive version takes much time for long numbers.
try to use 'for' cycle. It works perfectly with Fibonacci and code is very easy to understand
same thing happening with me, won't seem to work
The javascript control function was wrong, fixed. Remember mentioning the language when reporting a problem so we know where to look.
When you return
undefined
from the JavaScript function, you can see the expected outputs for the two (2) fixed tests (when you clickATTEMPT
) in the resulting error messages:After that, there are random tests.
There is no fixed test with that input in Python and the control function in the random tests returns
'87th'
for that input.No, that's an example value, h is a parameter of your function, it's not a fixed value.
Yes.
Yes.
So how I understood it is. The h is anything greater than zero, window, where the mother is, value is changing and is greater than zero but less than h, and the ball is dropped from h.
You're welcome, and don't worry too much about about it.
First of all, discussion related to a specific kata should be posted in its dedicated discourse page: https://www.codewars.com/kata/515de9ae9dcfc28eb6000001/discuss/javascript .
I just checked JS version of the kata and it works OK. The problem you see is probably caused by your solution: it passes a bunch of tests succesfully, and then, for some reason, crashes. It does not pass all tests which are there, it passes only some up to the point of the crash, and that's why you do not get any points.
My guess is that your solution tries to allocate a very large array, exhausting all available memory.
Also, please, read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution
Why didn't your write in that kata's discourse instead of here? It's totally unrelated to Feature Request.
No it doesn't, that's why you get an error message.
You pass all the tests until the error happens. Your code is exhausting the heap's memory.
No. You have to change your code to make it work. If you're using recursion, make sure you don't have an infinite loop.