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.
I was amazed when I saw this. I was trying the same code without using semicolons and it just doesn't work, the yield statement goes all the way to the destructuring assignment, yielding the whole array [curr, next].
I second this."Passed: 23, Failed: 0, Exit Code: 1", even with empty "fib()" it times out.
Hello! Very interesting and challenging kata.
I solved this for JS but it seems like O(logn) solution passes the random tests by a low margin (mine passes at 11600ms, although I only tweaked the algorithmic approach and not delve too much into code optimization). I think the len(B) === 5 along with the number of tests introduces too much variance. Did anyone else experience this as well?
I can't believe this is possible. I mean, i expected append() to behave as a pass-by-reference at best, but this is something else, it feels like the language (interpreter...) is creating some obscure references and when something is being modified, it translates to everywhere in real-time (kind of a really really bizarre observer pattern)
My solution works only if i select Python 3.4 (or something like that) but it does not work on python 2.7 (changing version automatically passed all the test with the same code)
I do think it's a bug as it may create unexpected errors.
I can pass 5/6. I only fail at randomTest:
arrays first differed at element [0][0]; expected:<1> but was:<0>
i tried to hardcode a <1> at [0][0] but it raises:
arrays first differed at element [0][0]; expected:<0> but was:<1>
I do believe there is a problem in the test. I was trying to solve this using a backtracking for funsies. I will try other techniques and fill in the results.
This is some quality stuff.
It was some hard work to make decompose(pow(2,31)) work below 8 sec. I fear there is a better solution using some theorems, but i prefered a hard coded backtrack.
Nice kata.
I feel like i should've put 5050 instead of the whole calc. But well, a general solution....
Impressive!