From dd926cc0561010f488dbb5690347e388f0ca88ca Mon Sep 17 00:00:00 2001 From: Tejwinder Singh Date: Tue, 24 Dec 2024 19:54:34 +0530 Subject: [PATCH] Update intro-to-dp.md --- src/dynamic_programming/intro-to-dp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dynamic_programming/intro-to-dp.md b/src/dynamic_programming/intro-to-dp.md index f658ea350..ab2d3a1a3 100644 --- a/src/dynamic_programming/intro-to-dp.md +++ b/src/dynamic_programming/intro-to-dp.md @@ -107,7 +107,7 @@ Of course, as written, this is a bit silly for two reasons: Firstly, we do repeated work if we call the function more than once. Secondly, we only need to use the two previous values to calculate the current element. Therefore, we can reduce our memory from $O(n)$ to $O(1)$. -An example of a bottom-up dynamic programming solution for fibonacci which uses $O(1)$ might be: +An example of a bottom-up dynamic programming solution for fibonacci which uses $O(1)$ memory might be: ```cpp const int MAX_SAVE = 3;