Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
xenomachina
· 14y ago · 0 comments
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].
Comments
[–]
code_devil
14y ago
Thanks. Fixed it.