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.
Im curious as to why we do not need to specify return "false" or "true" in this example?
Math is allowed, what you are getting is:
"Math::DomainError (Numerical argument is out of domain - "sqrt")"
you could use 'raise' to attend it or use logical expression to ensure the positive range of the number before use Math::sqrt
This comment is hidden because it contains spoiler information about the solution
if cartesian plane uses x,y , why use e,n? Makes it less clear...
Thanks for mentioning. I am new on this platform and didn't know the purpose of spoiler flag. Now I knnow. Thanks :)
Use spoiler flag, please.
This comment is hidden because it contains spoiler information about the solution
You get this error when you pass a negative value to Math.sqrt. You can't pass negative to it.
i agree, for example 1e16+1 returns true when it shouldn't
It doesn't reinvent the wheel which is what makes it a good solution.
If the kata wanted us not to use Matrix#det, it should have locked that method.
hmm.. i kept getting sqrt error. not sure why. thought Math.sqrt isn't supported here.
This comment is hidden because it contains spoiler information about the solution
isnt sort supposed to be time consuming? instead of just a single pass you are doing an nlogn operation just for sorting
sure using matrix... this is cheating
this makes the most sense.
Loading more items...