You are viewing a single comment's thread. Return to all comments →
def fibonacciModified(t1, t2, n): if n==1: return t1; elif n==2: return t2; else: nt1 = fibonacciModified(t1, t2, n-2) nt2 = fibonacciModified(t1, t2, n-1) return nt1 + nt2*nt2;
yeah memoization would be helpful
Seems like cookies are disabled on this browser, please enable them to open this website
Fibonacci Modified
You are viewing a single comment's thread. Return to all comments →
yeah memoization would be helpful