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.
I checked Binet's formula and it's more elegant;however, since the max 10^10, the number of elements in array is 50, so just straight forward pre-computation should work too.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Is Fibo
You are viewing a single comment's thread. Return to all comments →
I checked Binet's formula and it's more elegant;however, since the max 10^10, the number of elements in array is 50, so just straight forward pre-computation should work too.