Loading problem…
This problem builds on memoization. Complete that first, then load your solution to continue.
Implement a memoize function with LRU (Least Recently Used) cache that limits cache size and evicts least recently used entries.
fn and cache size limit