Skip to content

Commit d1ca1cf

Browse files
committed
fix example in lis
1 parent f9b3839 commit d1ca1cf

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
@@ -32,7 +32,7 @@ To accomplish this task, we define an array $d[0 \dots n-1]$, where $d[i]$ is th
3232

3333
$$\begin{array}{ll}
3434
a &= \{8, 3, 4, 6, 5, 2, 0, 7, 9, 1\} \\
35-
d &= \{1, 1, 2, 2, 3, 1, 1, 4, 5, 2\}
35+
d &= \{1, 1, 2, 3, 3, 1, 1, 4, 5, 2\}
3636
\end{array}$$
3737

3838
The longest increasing subsequence that ends at index 4 is $\{3, 4, 5\}$ with a length of 3, the longest ending at index 8 is either $\{3, 4, 5, 7, 9\}$ or $\{3, 4, 6, 7, 9\}$, both having length 5, and the longest ending at index 9 is $\{0, 1\}$ having length 2.

0 commit comments

Comments
 (0)