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.
Cool, thanks!
Is there a way to bookmark/add to collection a specific solution for a kata, for future reference?
Very inventive. I like the part with multiplying the running total by 10 as you're moving down the number - takes a certain kind of perverted logical thinking to come up with that, but it works!
This comment is hidden because it contains spoiler information about the solution
Would be more efficient to save Math.sqrt(num) into a var instead of calculating it every loop iteration, I think.
Also - really liked this little bit at the end: return num > 1;
Clever - allows to not have a separate error check for num<=1
On one hand I agree that it would've made it easy and that it should require effort to solve it.
BUT! Perhaps MENTIONING THAT WE CANNOT USE BIGINT in the kata description would've been most wonderfully, awesomely, magnificently excellent and logical, no?!
So people wouldn't wrack their brains wondering why the hell "BigInt is not defined" and wasting time trying to solve the issue, - instead of concentrating on solving the actual problem?
Goddammit, this is so frustrating.
Nice and simple, I like.
OMG PWN3D!
Just wanna say how much I liked the vars update without using a temp var. Elegant!
I suggest you clarify the kata description - specifically, make absolutely clear what it is EXACTLY that you want the function to return.
At the moment the instructions show this:
printer_error(s) => "0/14"
as the expected return, - while what is REALLY expected is this:
0/14
Make it clear that you want JUST THE RATIO, not the whole thing including the words "printer_error(s)", etc.