f(5) 5 f(4) + f(3) f(2)+f(1) 3 + 2 1 + 1 f(3)+f(2) f(1) + f(0) f(1) + f(0) 2 + 1 1 + 0 1 + 0 f(2)+f(1) 1 + 1 f(1)+f(0) 1 + 0 I computed f(5) once. I computed f(4) once. I computed f(3) twice. I computed f(2) three times. Let's say that I am computing fib(50). fib(50) gets computed 1 time. fib(49) " 1 time. fib(48) " 2 times. fib(47) " 3 times. fib(46) " 5 times. fib(47) " 8 times. Computing fib(n) takes about fib(n) time. Moral: recursion is awesome, but it's not the best at everything. We have a couple of options: 1. Come up with a better algorithm. 2. Use the same sucky algorithm, but add a hash table to it. If you a hash table (or other data structure) to save results of a computation, so that you never have to compute that value again, this techinique is called "memoization."