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.
That's true. Nice catch!
Obviating the 3 middle numbers seems rather odd to me (and that's not what the example shows), but if it helps, I've added a comment in the example you found not clear.
Pretty self explanatory given the example, if the length is odd, you should ignore the middle number when adding the halves. You should test the string represents a valid number tho (the middle char included.)
OK. More than 500 people have passed the Java kata (1760); after 500+ people have passed it is impossible to change the tests (CW rule).
Initial solution says:
public static long findNb(long m)
so BigIntegerm
was neither planned nor asked for Java... only long!If you want BigInteger take a translation with them:-)