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.
wtf
How do you prove that 'random' and 'randint' indeed return a random number? Explain if it's not too hard, I'm really interested..
sh1t solution
oops, I must've raised an exception if vectors have different lengths...
Oh, thank you!
Also, it's kind of confusing when kata's name is Memorized Fibonacci but when you implement solution based on memorization or even tabulation, you get timed out. I've got to come up with more optimized solution than memorization :( Ok
Ah, no, it works, I just needed to simplify it, but I have no idea why this works...
There can be some confusion between different authors, whether to include/index the 0 term in the Fibonacci sequence (whether fib(0) = 1 or fib(0) = 0). See this stackoverflow post for example
117669030460994
is therefore either fib(69) or fib(70) - if your code can produce this number, all you need to do therefore is change the indexing by one (for example, if given inputn
use your code to calculatefib(n-1)
) as this kata uses: fib(0) = 0, fib(1) = 1, fib(2) = 1, fib(3) = 2 etc.117669030460994 should equal 190392490709135
Isn't the 70th number in the Fibonacci sequence is 117669030460994??
xD
I've no idea how to solve it without writing 200+ lines of code...
...