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
Good points. I have included links for interpolation methods (although the Bernstein Form might not be relevant for this kata, I'll review that some more) and reworked my examples. What do you think of these updates?
This kata does combine two concepts, and perhaps it would be better to separate them into individual katas; namely, "interpolation" over an integer-valued polynomial, and "representation" of an integer-valued polynomial. In this case, the two concepts are closely tied, since (as described) a standard-form polynomial (like 0.5 x2 + 0.5 x) can be integer-valued without having integer coefficients, while a Binomial form polynomial is integer-valued if and only if it has integer coefficients.
Slight modifications and approved.
The only other kata I have authored so far is here: http://www.codewars.com/kata/5674788cadb5889b69000045 and it uses the same math to create the polynomial representation that this kata uses for evaluation.
Thank you for your help in improving this one!
I think I'll put a +(Number.toFixed(2)) in place in the official solution to avoid further difficulty with this, and explicitly state this in the description. The main point is not getting high-precision results for non-integers, but rather to expand awareness of an alternate internal representation of polynomials.
This comment is hidden because it contains spoiler information about the solution
I have included some links and an expanded section on the example calculation. Please let me know what you think. Thank you again for your feedback. :-)
Please help me understand what you mean. In the description, I include an example call, the expected return value, and the math of the expected return value. Are you saying that I should include more such examples in the description, or that the math needs more explanation, or something else?
Thank you for your feedback.
"Boring" is a bit harsh. I think the kata rating is too high, but after doing the math it's somewhat interesting to find a "small" solution to this one.
This is my first kata I've authored. Any feedback would be greatly appreciated. :-)
Leaving out the rotations makes this version O(n^2).
Yeah, this one is O(n^3)...
The "pi/2" is obviously supposed to be "pi", I forgot to change it after I changed my approach. Maybe I'll make a fork that does no rotations...