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.
Nice! I split the name first, I didn't know you could immediately access the index as a string.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Thanks for explaining, that makes sense.
maybe, but what default would make sense here? the (implicit) default case here returns undefined, which i think is appropriate
Shouldn't "best practice" involve a default case?
There are a few ways to get know if a number is power of two. And all of them will work quickly with small numbers. But the hidden test cases(which you run by pressing 'submit' buttom) use very big numbers. And some alghoritms will be able to deal with very big numbers for a short time. Yes, it's a kind of joke why i didn't show all values in public test cases:)
I thought the three test cases (when you press test, not submit) was only for the test cases shown, which use small numbers. Shoudn't that be working even with a terrible solution?
The timeout happens because of test cases use very big numbers, and not all solutions can be good.
Sorry for the long time response, i was away.
I know that my english is not good.
Could you please write correct english description? I will be happy to write better description.
It says that I have completed this Kata, but I have got the red Incorrect message every time I've tried to submit. The operation times out every time, even on the test cases. Why is this? My solution works when I test it in JSFiddle.