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 think remainder and myNum can be computed in a single instruction using
(myNum, remainder) = myNum.quotientAndRemainder(dividingBy: 10)
. Why would you not use String conversion to decode the number, but then use it for encoding?Wow this is the only solution I found that does not use string conversion!