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.
Seems so;
If it passes the cases till timeout then it is right.
This comment is hidden because it contains spoiler information about the solution
It does locally in ~30ms. I'm timing out after ~830 tests.
After attempting it in python, my solution works with over 5 seconds to spare. You may want to reduce the number of tests for Javascript.
There are 1640 tests in javascript and ~450 in python.
Just make sure your solution can get 2**49th item; if it does then it will definitely pass random tests too :)
I'm really enjoying this kata so far.
I've made it through 830 tests, but I see that you meantioned it was ~450 in total. Is there an issue with there being too many tests or otherwise?
Also, I think I've gone the one step deeper you suggested, maybe there is a more efficient way that I'm not getting to (that is still relatively brute force)? I'm not really looking for hints, I just don't know if I've met the expectation yet or not
*Edit: After returning at the top of the function call, I'm getting over 1600 tests, and its taking over 6 seconds just to call and return the function. I figure it is too many tests.