Memoization is an optimization technique used to improve the performance of algorithms by storing the results of expensive function calls and returning the cached result when the same inputs occur again. It is commonly used in recursive functions to avoid redundant calculations.
ruff check .
ruff format .
poetry run python main.py --num 35