VERY simple code snippet (for my reference) on using lru_cache in Python.
How to use lru_cache provided by functools in Python. It allows for a recursion function to be "converted" into DP methodology (that uses memoization).
The example code solves problem 935 in Leetcode titled Knight Dialer.