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.
You can use "i * i <= n + 1" instead of "i <= n;". It removes redundant calculations.
I dislike this solution cuz it reminds me how bad I am at math.
I don't think I ever learned that in math class.
how do u even do this?
me too
I found some algorithm paper about how to make a sqrt().that's awesome O(1) algorithm.
I've got the same issue, is that impossible then to resolve that problem ?
I could not understand how to fix that unsupported type problem.
Nice use of the properties of the divisions, Euclides would be proud of you guys. Simply and clever.
This solution made me a fool
Yes, but once the square is found, it returns => breaks out of the loop.
That would take long to compute for bigger numbers, no?
Approved
This is not clever, it's best practice. Don't be fooled by the strange votes.
Merge conflict.
The solution in the tests should better be
static
.(And
div
is aftermul
, so there was no problem.)Should all be appropriately fixed.
Loading more items...