You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/dynamic_programming/longest_increasing_subsequence.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,7 +145,7 @@ This method leads to a slightly longer code, but in return we save some memory.
145
145
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)$.
146
146
147
147
We will use the dynamic programming array $d[0 \dots n]$.
148
-
This time $d[l]$ doesn'tcorresponds to the element $a[i]$ or toan prefix of the array.
148
+
This time $d[l]$ doesn'tcorrespond to the element $a[i]$ or toa prefix of the array.
149
149
$d[l]$ will be the smallest element at which an increasing subsequence of length $l$ ends.
150
150
151
151
Initially we assume $d[0] = -\infty$ and for all other lengths $d[l] = \infty$.