Ad
  • Custom User Avatar

    I agree, this seems to be more mathematical problem than programming one. There was also no mention of optimalization part of challange. I did simplest iteration based fibonacci calculation and got timeout when n was beyond 1 mil. I don't understand why there are tests with n bigger than 1 mil, the name suggest to get proper 1 mil value. I'm kinda dissappointed with this kata as I did not want to specifically search for mathematical ways of getting different equation to solve this without using the series generation.

  • Custom User Avatar

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

  • Custom User Avatar

    Why would it have to? It's somewhat clear from the definition of Fibonacci series, and is mentioned in HINT I given in the description.
    It's not that the author decided it to be this way, it's a consequence of applying the formula and extending it into negative indexes in a way explained in the description, isn't it?