We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8ea23f commit e33c2e1Copy full SHA for e33c2e1
src/sequences/longest_increasing_subsequence.md
@@ -39,7 +39,7 @@ Then there are two options:
39
Let's focus on that number:
40
it can be any element $a[j]$ with $j = 0 \dots i-1$ and $a[j] < a[i]$.
41
In this fashion we can compute $d[i]$ using the following formula:
42
- If we fixate the index $j$, than the longest increasing subsequence ending in the two elements $a[j]$ and $a[i]$ has the length $d[j] + 1$.
+ If we fixate the index $j$, then the longest increasing subsequence ending in the two elements $a[j]$ and $a[i]$ has the length $d[j] + 1$.
43
All of these values $d[j]$ are already known, so we can directly compute $d[i]$ with:
44
45
$$d[i] = \max_{\substack{j = 0 \dots i-1 \\\\ a[j] < a[i]}} \left(d[j] + 1\right)$$
0 commit comments