Skip to content

Commit 425607e

Browse files
author
Joseph Luce
authored
Update 300_longest_increasing_subsequence.md
1 parent 681218b commit 425607e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

leetcode/medium/300_longest_increasing_subsequence.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ If we were to start from the left to the right, we would have seen the longest s
99
Inorder for us to know what those longest subsequences were, we will need a way to store that, hello dynamic programming.
1010

1111
For each element, we would need look at the numbers less than the current element on the left side.
12-
Now that we know which numbers are those, we can look at their corresponding longest subsequence the in dynamic programming array.
13-
This will tell us what to set as our longest subsequence for this current element.
12+
Now that we know which numbers those are, we can then look at their corresponding longest subsequence in the dynamic programming array.
13+
From this list, get the longest subsequence.
14+
This will tell us what to set as our longest subsequence for this current element + 1.
1415

1516
We are basically building the longest increasing subsequence from the bottom up.
1617

0 commit comments

Comments
 (0)