This should not have a "Best Practices" label. This is not particularly efficient, nor understandable. You're still calculating a series of powers with powers up to 7, which can still grow quite huge and slow. If your language doesn't have native big integers, this solution might not work.
This comment is hidden because it contains spoiler information about the solution
spoiler flag, please...
This comment is hidden because it contains spoiler information about the solution
nice but hard kata (at least for me :))
Omg dude
Why I cant think so simple
This comment is hidden because it contains spoiler information about the solution
Genius ! Algrithme is the king.
inspired.
A few more line might improve performance a lot for some cases, but may destroy the beauty of your wonderful codes, and look ugly definately.
From engieering point of view, I would believe a few more lines is better.
It is a little difficult to understand, my ugly version might be a little easier for most of us(not every one is number master)
This should not have a "Best Practices" label. This is not particularly efficient, nor understandable. You're still calculating a series of powers with powers up to 7, which can still grow quite huge and slow. If your language doesn't have native big integers, this solution might not work.
Flabbergasted as well.
...but forreal, how does this work? I'm flabbergasted.
Ok
Please, use spoiler flag next time.
This comment is hidden because it contains spoiler information about the solution