Optimization, Optimization Algorithms, Python, Traveling Salesman, Algorithms.
fibonacci(n-2) Let’s use memoization first. Now, the tracing tree of fibonacci(5) would be: Tracing tree. Image by the author. Time complexity is O(2^n). This is exponential, it would take too much time for bigger values. It is noticeable from the tracing tree that we are calling the same function