• Default User Avatar

    yep, that's a first!

  • Default User Avatar

    i dont see how an ad blocker could possibly interfere with the variables, the code is evaluated server side, not client side

  • Custom User Avatar

    you didn't read the description...

  • Custom User Avatar

    I dont get it: How is it possible to palindromize 750? reversed is 057.

  • Custom User Avatar

    I didn't check it's actually the case but I think there may be an overflow issue in JS: the maximum value tested is fib(69), which is greater than Number.MAX_SAFE_INTEGER.

  • Custom User Avatar

    There is an issue with the random tests in javascript. I am getting "expected 5 to equal 4" last I checked 4 is not a number in the fibonacci sequence.

  • Default User Avatar

    The trick of the memoized version is that we will keep a cache data structure

    ...into a recursive Fibonacci function(there is no need in ecursion at point we have a previous values)

    first cite means we got a previous values

    second cite means it is still advisable to use recursion, but why?

  • Custom User Avatar

    Solvers reading about memoisation are going to get spoilers. It's not feasible to prevent that. What are they going to do, not read up on memoisation? Closing.

  • Default User Avatar

    Kata is very nice, but there is one problem -- sudden spoiler.
    When I tried to read about memoization in Haskell I found the exact solution to this kata as an example (in afterthought, it was quite obvious). Comment on that in description would be nice, so others won't spoil their fun accidentaly.

  • Custom User Avatar

    cache is recreated again every time your function is called, that won't work. Google how memoization is done.

  • Custom User Avatar

    Refactor the function into a recursive Fibonacci function that using a memoized data structure avoids the deficiencies of tree recursion

    A simple recursive solution won't work, a recursive solution that uses memoized data will work, and that's what the kata is about.

    Your solution doesn't work because it's too slow when called several times in a row, it always calculates all Fibonacci numbers until the nth one.

  • Default User Avatar

    Recursion don't fit for this kata.
    I would to know why my code does not finish while function gives correct results.

  • Custom User Avatar

    Where is the recursion or the memoization? Google to know what those are if you don't know.

  • Default User Avatar

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

  • Default User Avatar

    I still don't understand decorators in Python. Help me pls :(

  • Loading more items...