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.
I'm surpised this isn't the top result, it's the fastest solution I've found:
1.58 µs ± 13.9 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)
vs the top solution (in best practices):
1.83 µs ± 23.9 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)
This comment is hidden because it contains spoiler information about the solution
Thanks man!
This comment is hidden because it contains spoiler information about the solution
Done.
Ah I see now that you have "until the nth year", maybe change that to [n]th year, with the n highlighted the same as the other variables, as these are what draws the eye. Fun kata though.
The description says:
I thought that was clear. What do you propose instead of that?
I had to re-read the explanation a few times to find out what 'n' meant. As compounding interest is the main theme of the kata, I think this could be made clearer.
Your comment says you use a hash, but you are just checking in the array every time. "table" is redundant :)
I also get this error, very annoying.
Unknown error
Process took 1297ms to complete
Am I too far off?
Python: Unknown error after 1700ms