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.
Can somebody give me a hint for a python solution? I have optimized the prime number searching function using sieve of Eratosthenes algorithm but the main function is taking very long time.
I am stuck with python. I have used very fast method for searching prime_numbers, but still timeout. Don't know where I am messing up.
This solution is actually fast. I ran double(30, 20000) for the above solution and my solution without the "if b > 0.00000000001" part. my solution took 565ms wheras above solution took 165ms.same code but way faster.
This comment is hidden because it contains spoiler information about the solution
This was one hell of a good kata. Spend whole day and just got it done with python. Now watching other people's solution and I just realised I know nothing. People are just way smarter. Bookmarking this. Will come back later and practice other people's solution.
Damn! you and I followed exactly the same way. i have wrote the exact same for loop and thus excution time ran out but after someday I wrote the following code and it worked.
This comment is hidden because it contains spoiler information about the solution