You are viewing a single comment's thread. Return to all comments →
Can you post your recursive solution, please.
public static BigInteger fiboMod(BigInteger t1,BigInteger t2,int n){ n = n-1; if(n == 1){ return t2; } return fiboMod(t2,t2.pow(2).add(t1),n); }
This is not DP. Its plain Recursion.
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Fibonacci Modified
You are viewing a single comment's thread. Return to all comments →
Can you post your recursive solution, please.
This is not DP. Its plain Recursion.