careful observation of the preceding tree shows some interesting patterns the call to ( happens twice the call to ( happens thrice alsothe call to ( happens twice the return values of the function calls to all the times that fib( was called never changes the same goes for fib( and fib( the computational time is wasted since the same result is returned for the function calls with the same parameters these repeated calls to function with the same parameters and output suggest that there is an overlap certain computations are reoccurring down in the smaller subproblems better approach would be to store the results of the computation of fib( the first time it is encountered this also applies to fib( and fib( lateranytime we encounter call to fib( )fib( )or fib( )we simply return their respective results the diagram of our fib calls will now look like thiswe have now completely eliminated the need to compute fib( )fib( )and fib( this typifies the memoization technique wherein breaking problem into its subproblemsthere is no recomputation of overlapping calls to functions the overlapping function calls in our fibonacci example are fib( )fib( )and fib( )def dyna_fib(nlookup)if < lookup[ if lookup[nis nonelookup[ndyna_fib( - lookupdyna_fib( - lookupreturn lookup[