Skip to content

Commit 60f8fc2

Browse files
Update longest_increasing_subsequence_iterative.py
1 parent 05b2551 commit 60f8fc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dynamic_programming/longest_increasing_subsequence_iterative.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def longest_subsequence(array: list[int]) -> list[int]:
4343

4444
for i in range(1, n):
4545
for prev in range(i):
46-
# If array[prev] is less than array[i], then
46+
# If array[prev] is less than or equal to array[i], then
4747
# longest_increasing_subsequence[prev] + array[i]
4848
# is a valid increasing subsequence
4949

0 commit comments

Comments
 (0)