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