def myfun(myint, mylist): if myint == 0 or myint == 1: return 1 elif mylist[myint] == 0: mylist[myint] = myfun(n-1, mylist) + myfun(n-2, mylist) return mylist[myint]

Search

Jun 28, 2020

· Edited: Jun 29, 2020# What is the time complexity of this function?

What is the time complexity of this function?

O(2^n)

O(n^2)

Are you sure?

FYI, Sarah's answer is not right! You still have a chance!