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.
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
+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
Ad.1 Isn't 0.5 time in example test fixture enough? If not, maybe I will state it in the description.
Ad.2 I added address to wikipedia page about Newton's laws of motion, if you dig enough you will also find formula for the distance traveled in movement with constant acceleration.
Ad.3 I also struggle with this sometime, I usually test my code in node console first and then I submit it on the site.
Thanks for your feedback!
For syntax errors, use jslint (or similar) to track down the offending brace.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Maybe it's the space after the
-
?That description does seem a little ambiguous, I've adjusted the documentation.
I broke up the wall of text, with an graphical depiction of how
bind
andlift
relate to a functionf
(But, for some reason the image is showing up very small on this page for me):This comment is hidden because it contains spoiler information about the solution
Loading more items...