Ad
  • Custom User Avatar

    yeah - no worries

  • Custom User Avatar

    Nope, no examples, looks like I was mistaken. I was looking at the examples on Desmos which were out of order in some cases.

    I modified my code to fix what I thought was the issue, but must have fixed the actual issue accidentally at the same time.

  • Custom User Avatar

    That's just the way codewars is these days - don't want to make ranking up too easy ;)

    As for the (0, 0) it should always be in the list - do you have any examples of when it wasn't?
    I have moved it to first in the fixed tests.

  • Custom User Avatar

    Feels like it should be ranked higher that 5kyu, but otherwise fun problem.

    One thing to note that did mess me up: The kata definition states that the starting point is (0,0), so I don't think that it should be included in the passed list. Or, if it must be passed in the list, it should always be first. A few of the inputs included (0,0) in apparently random places.

  • Custom User Avatar

    (px - a)^2 + (qy - b)^2 = r^2

    No, the equation used is slightly different, which is why the way p and q are applied is mentioned in the description. You should be able transform it to the canonical form without any problems if you need to.

  • Custom User Avatar

    Is the equation given for the ellipse correct? It seems like it should be (p(x - a))^2 + (q(y - b))^2 = r^2