Refactor memoized knapsack implementation to remove global state #17645
Annotations
2 errors
|
ruff
Process completed with exit code 1.
|
|
ruff (UP033):
dynamic_programming/knapsack.py#L40
dynamic_programming/knapsack.py:40:15: UP033 Use `@functools.cache` instead of `@functools.lru_cache(maxsize=None)`
help: Rewrite with `@functools.cache
|