|
|
|
|
|
by dvt
2516 days ago
|
|
What he states is that if n <= k, then we run in O(1) time, which is correct, because array lookup is O(1): return fibonacci[k]
This is the canonical benefit of memoization, further clarified by this quote: "This solution has an O(k) space and time complexity for the first query." |
|