Skip to content

Commit 444220d

Browse files
Update longest_increasing_subsequence.py
1 parent f0447ce commit 444220d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dynamic_programming/longest_increasing_subsequence.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def longest_subsequence(array: list[int]) -> list[int]: # This function is recu
4646
while not is_found and i < array_length:
4747
if array[i] < pivot:
4848
is_found = True
49-
temp_array = [element for element in array[i:]]
49+
temp_array = array[i:]
5050
temp_array = longest_subsequence(temp_array)
5151
if len(temp_array) > len(longest_subseq):
5252
longest_subseq = temp_array

0 commit comments

Comments
 (0)