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 spent the last two hours very nearly completing this and then wondering why the ordering in the examples given was so... odd. thank you for simplifying this
This Kata was fun! I just have one suggestion. I'm not sure if it's built in to other languages, but for Swift there is no way to calculate positive integer values larger than what can be represented with unsigned 64bit integers. This means a factorial of 20 (or digit "K") is the largest that can be calculated.
I had to work around this by "pretending" digits larger than K didn't exist. Luckily, none of your test examples have digits larger than K.
Otherwise, you would have to implement your own BigInt data type, which is something that's way outside of the scope of this kata!