Skip to content
START WITH A QUESTION

What would you like to understand?

Find an answer. See the moment it becomes clear. Follow the idea further.

← Concept directory

Answers for “为什么直接使用递归计算斐波那契数列效率极低?”

1 keyword matches

Understanding your question. You can explore the search results below now.

Find a method

↗

The video constructs a recursion tree by setting the target computation f(7)f(7) as the root node. It then recursively applies the formula f(n)=f(n−1)+f(n−2)f(n) = f(n-1) + f(n-2) to split each non-base-case node into two child nodes.

Conditions: The recurrence relation is f(n)=f(n−1)+f(n−2)f(n) = f(n-1) + f(n-2).; The base cases are f(1)=1f(1) = 1 and f(2)=1f(2) = 1.; The target computation is f(7)f(7).