Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
Really enjoyed this kata. Very interesting and fun to code
This comment is hidden because it contains spoiler information about the solution
You can do more research :) If you read the description of the kata carefully, you can find a link with some hints. Going through the linked document, you can find a very convoluted hint on some algorithm for calculating Fibonacci numbers more efficiently than in linear fashion. Hint is very complex for a person not very familiar with math (I could not get jack from it), but it's at least some starting point for further research.
This comment is hidden because it contains spoiler information about the solution
I haven't tried your solution, but you can verify it by running your solution for values like n=1_000_000 and n=1_500_000.
However, even if you manage to get it in performant way, I would be concerned with accuracy issues. Every exponentiation operation loses precision significantly, and with exponents of such magnitude, I think you won't manage to get accurate result. I did not check it by myself though, so I might be wrong :)
You may also want to read docs on block code formatting: https://github.com/codewars/codewars.com/wiki/Markdown-Formatting#block-code-formatting
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution