Tag: limit
-
Can you explain this difference of depth recursion in Python using those seemingly equivalent codes?
6 I noticed that on my machine, the following reaches the max of depth recursion for n = 2960: m = {0:0, 1:1} def f(n): if n not in m: m[n] = f(n – 1) + f(n – 2) return m[n] while this version reaches it for n = 988: m = {0:0, 1:1} def…