mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
[mypy] Fix type annotations for dynamic programming (#4687)
* Fix mypy error for knapsack.py * Fix mypy error for longest_increasing_subsequence * Fix mypy error for fractional_knapsack_2.py
This commit is contained in:
@ -36,7 +36,7 @@ def longest_subsequence(array: list[int]) -> list[int]: # This function is recu
|
||||
pivot = array[0]
|
||||
isFound = False
|
||||
i = 1
|
||||
longest_subseq = []
|
||||
longest_subseq: list[int] = []
|
||||
while not isFound and i < array_length:
|
||||
if array[i] < pivot:
|
||||
isFound = True
|
||||
|
Reference in New Issue
Block a user