Now we only compute each Fibonacci number once. Our evatuation tree looks something like this, where we've cut out all of the duplicate nodes. Each number starting from F2F_2 requires doing one addition (and two lookups, but lookups are fast), so we can compute FnF_n using n2n - 2 additions.

plot

Now we only compute each Fibonacci number once. Our evatuation tree looks something like this, where we've cut out all of the duplicate nodes. Each number starting from F2F_2 requires doing one addition (and two lookups, but lookups are fast), so we can compute FnF_n using n2n - 2 additions.

plot