Skip to content

Commit e33c2e1

Browse files
rahulsustadamant-pwn
authored andcommitted
Update longest_increasing_subsequence.md
Fixed typos
1 parent c8ea23f commit e33c2e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sequences/longest_increasing_subsequence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Then there are two options:
3939
Let's focus on that number:
4040
it can be any element $a[j]$ with $j = 0 \dots i-1$ and $a[j] < a[i]$.
4141
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$.
42+
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$.
4343
All of these values $d[j]$ are already known, so we can directly compute $d[i]$ with:
4444

4545
$$d[i] = \max_{\substack{j = 0 \dots i-1 \\\\ a[j] < a[i]}} \left(d[j] + 1\right)$$

0 commit comments

Comments
 (0)