Skip to content
Code ReadingBranching Calls
Read the Big-O

Branching Calls

Every call makes two more calls and nothing is remembered. How does the time grow with n?
1def fib(n):
2 if n < 2:
3 return n
4 return fib(n - 1) + fib(n - 2)