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 agree it's not very original.
To make it more challenging, you might replace int with BigInteger and test for bigger numbers.
Int will become too small very quickly for fibonacci.
Also the calculation method will become much more important the larger the number is.
If you use recursion without memoization the processing time will quickly become too slow for codewars.
And the kata more challenging.
This comment is hidden because it contains spoiler information about the solution
That's true. I just did not find any simple working version for Java, wanted to practice here at CodeWars.
This kata has been done too many times in varying ways. It just isn't original.
You are right. Thanks for the catch!
IllegalStateException
It should probably be
IllegalArgumentException
.