Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    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.

  • Default User Avatar

    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!

  • Default User Avatar

    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.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    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. :-)

  • Default User Avatar

    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.

  • Default User Avatar

    "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.

  • Default User Avatar

    This is my first kata I've authored. Any feedback would be greatly appreciated. :-)

  • Default User Avatar

    Leaving out the rotations makes this version O(n^2).

  • Default User Avatar

    Yeah, this one is O(n^3)...

  • Default User Avatar

    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...