mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 18:49:26 +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:
@ -91,7 +91,7 @@ def knapsack_with_example_solution(W: int, wt: list, val: list):
|
||||
)
|
||||
|
||||
optimal_val, dp_table = knapsack(W, wt, val, num_items)
|
||||
example_optional_set = set()
|
||||
example_optional_set: set = set()
|
||||
_construct_solution(dp_table, wt, num_items, W, example_optional_set)
|
||||
|
||||
return optimal_val, example_optional_set
|
||||
|
Reference in New Issue
Block a user