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 would definitely change approach, then: you can easily find many occurrences of that approach failing...
I'm actually having the same problem with 59884848495835, having taken the exact same approach as tushar (swapping pairs). It seems to work for every number I throw at it except that one for some weird reason.
Anyway, loving this kata, seemed easy enough at first and it got me hooked for a full day now trying new stuff :)
Really. Sorry
I am pretty confident the initial input is
9876543210
, check again.The initial input is 9876543201. My code returns 9876543210 which is correct, I suppose. But the test don't pass.
Handling of negative numbers is not specified and they are not excluded by the used types (long instead of ulong in C#). Doesn't really matter, since these numbers are not included in the tests, but I'd like to have my inputs defined, please.