The term "memoization" was introduced by Donald Michie in the year 1968. This is accomplished by memorizing the calculation results of processed input such as the results of function calls. If the same input or a function call with the same parameters is used, the previously stored results can be used again and unnecessary calculation are avoided.
My function:
def fibonnaci(n):
if n ==0 or n == 1:
return 1
else:
return fibonnaci(n - 1) + fibonnaci(n - 2), total_call
n =8
print(fibonnaci(n))
I did not understand how to use it in practice. Could anyone explain how to use memoization in fibonacci calculus?