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.
It is indeed a good solution, but it's important to note that it overflows faster, causing us to lose almost 1/3 of the possible values
A lot of us using unnecessary computing power before remembering that this little formula existed, this is why maths are important!
function isprime is a "left over" and forgotten to delete...see second solution...
Tried to work with Dates function, but didn't work. Forgot to delete the "using Dates".
Yes, you're right! It was a typo, I meant O(1) :)
O(1), unless you mean n as the number of bits in the inputs :)
Super clever! Using a formula to achieve O(n) solution is awesome!