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
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Good answer.
Mozzila documentation state this: Deprecated: This feature is no longer recommended.
This comment is hidden because it contains spoiler information about the solution
I have a gradient descent kata for you http://www.codewars.com/kata/linear-regression-with-one-variable/ruby :-)
It's in Ruby - let me know if you'd like a js version
uhm, Octave if I'm not mistaken. it had some usefull built in stuff for Matrices and such, but the language itself was just weird, it wasn't bad, it just felt... wrong (I can't remember why, probably stuff like 1 based arrays and stuff like that)
+1 would love a kata like that as well. Just out of curiosity, in which language was it in your CS course ?
I would include this as well:
As an aside the test errors are clearer when using assertEquals.
You could also look into converting the number into real binary first :) and trying to find a pattern on converting that to 'negabinary'.
that said, most solutions haven't done it that way, but it is a possible route.
Added
To help improve on this example, it seems that the following test would also pass:
This comment is hidden because it contains spoiler information about the solution
I believe "some" breaks on the first hit, where as "every" has to go over every element in the array, making it a lot slower for higher numbers. (not sure if this is the case with javascript, but it would make sense)
Loading more items...