Skip to content

Commit 40910bf

Browse files
authored
Fixed Grammer Mistake
1 parent 8cb965f commit 40910bf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dynamic_programming/longest_increasing_subsequence.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ def longest_subsequence(array: list[int]) -> list[int]: # This function is recu
4141
# Else
4242
pivot = array[0]
4343

44-
# Either the subsequence contains the pivot or it doesnt
45-
# The sub_sequence which is longer will be returned
44+
# Either the subsequence contains the pivot or it does not,
45+
# The longest subsequence is calculated in both cases and
46+
# The longer subsequence is returned
4647
without_pivot = longest_subsequence(array[1:])
4748
with_pivot = [element for element in array[1:] if element >= pivot]
4849
with_pivot = [pivot, *longest_subsequence(with_pivot)]

0 commit comments

Comments
 (0)