Loading topic
collections.Counter. The goal is to recognize, before you write any caching code, whether a recursive solution keeps solving the same smaller problem again and again.3 min readfib(n) = fib(n-1) + fib(n-2), with base cases fib(0) = 0 and fib(1) = 1.3 min readfunctools.lru_cache, and bottom-up with a table. It also assumes you can count states and work per state. The question here is which version to write for a given problem.3 min readdp[i - 1][j - 1].3 min read