We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Test case 2 and 6 takes only a little more than a second to run. Try using BigInteger data type and store the previous values in an array(memoization technique).
Cookie support is required to access HackerRank
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 →
Test case 2 and 6 takes only a little more than a second to run. Try using BigInteger data type and store the previous values in an array(memoization technique).