Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 04bfe32

Browse files
authored
Update longest_increasing_subsequence.md
1 parent 7d314c4 commit 04bfe32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dynamic_programming/longest_increasing_subsequence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ This method leads to a slightly longer code, but in return we save some memory.
145145
In order to obtain a faster solution for the problem, we construct a different dynamic programming solution that runs in $O(n^2)$, and then later improve it to $O(n \log n)$.
146146

147147
We will use the dynamic programming array $d[0 \dots n]$.
148-
This time $d[l]$ doesn't corresponds to the element $a[i]$ or to an prefix of the array.
148+
This time $d[l]$ doesn't corresponds to the element $a[i]$ or to a prefix of the array.
149149
$d[l]$ will be the smallest element at which an increasing subsequence of length $l$ ends.
150150

151151
Initially we assume $d[0] = -\infty$ and for all other lengths $d[l] = \infty$.

0 commit comments

Comments
 (0)