We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd3c159 commit 8cb965fCopy full SHA for 8cb965f
dynamic_programming/longest_increasing_subsequence.py
@@ -41,8 +41,8 @@ def longest_subsequence(array: list[int]) -> list[int]: # This function is recu
41
# Else
42
pivot = array[0]
43
44
- #Either the subsequence contains the pivot or it doesnt
45
- #The sub_sequence which is longer will be returned
+ # Either the subsequence contains the pivot or it doesnt
+ # The sub_sequence which is longer will be returned
46
without_pivot = longest_subsequence(array[1:])
47
with_pivot = [element for element in array[1:] if element >= pivot]
48
with_pivot = [pivot, *longest_subsequence(with_pivot)]
0 commit comments