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.
This comment is hidden because it contains spoiler information about the solution
With this type of algorithm, even if you would convert it to a recursive one, you would never run out of stack; you would rather run out of memory because of the gigantic numbers before even reaching depth 50 of recursion. Because the recursion depth in this case is log2(n).
Being non-recursive means that this can handle extremely large numbers. If I was being really pedantic, I'd prefer either of n//=2 or n>>=1 over n/=2 because the latter changes n to float which introduces unnecessary complexity at the very lowest level
This comment is hidden because it contains spoiler information about the solution
I'm actually curious too
what algorithm is this?
Thanks for explaining this. I was trying to wrap my head around what all this algorithm is doing.
What a superb explanation! Thank you, you definitely helped me understand what's going on in this code. Cheers mate.
hey bro. i cant understand this...
My brain is melting. Nice Logic!!
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
thank you for you explanation!
hmm..
Loading more items...