4 ms·
This isn't right: fib_val = fib_mem(n-1) + fib_val(n-2) The second term on the rhs should be fib_mem(n-2) or perhaps even fib_list[n-2].
by xenomachina 15y ago
This isn't right:
fib_val = fib_mem(n-1) + fib_val(n-2)
The second term on the rhs should be fib_mem(n-2) or perhaps even fib_list[n-2].
- code_devil 15y agoThanks. Fixed it.