fib_memo(n, memo=None) that returns the n-th Fibonacci number (fib(0)=0, fib(1)=1) using recursion with a dict-based memo cache to avoid recomputation. The cache must be a plain dict passed/reused across recursive calls.fib_memo(10)
55
Standard Fibonacci sequence, 10th term is 55.
fib_memo(0)
0
Base case.
Default `memo = {}` on first call (careful with mutable default args — initialize inside if None).
Check `if n in memo: return memo[n]` before recursing.