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.
Your language is Python, apparently. ( Please mention this. )
Yes, you need better time complexity than
O(m)
. This is not hard - you don't need to test every single number up tom
for being a Fibonacci number, do you?If your code time out, you must find a more efficient method. I don't know how you calculate your complexity, but, seeing the submitted solutions, I have good reason to think your reasoning is inaccurate.
You can read the user-submitted solution from a file: https://github.com/Codewars/codewars.com/blob/master/docs/_recipes/testing/restricting-solution.md
Not sure if possible, but you could perhaps #define while cheat_detection(); while
It doesn't matter that that turns it into two statements, just as long as the cheat_detection() is called you will (silently) fail the test. Be sure to VERY CLEARLY state that 'while' is not allowed to be used ;).
If people know you do this they can work around it, of course.