3 ms·
Fibonacci really doesn't need memoization since you can implement it efficiently by keeping just the last two values on the stack. Dynamic programming (like the
by Tobu 15y ago
Fibonacci really doesn't need memoization since you can implement it efficiently by keeping just the last two values on the stack. Dynamic programming (like the knapsack problem) is a better example.