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.
10 is NOT the maximum number of digits in the number, but the number of (possible) different digits in a number. And there are only ten: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
Each of the 10 array elements is used to count the number of occurances of the respective number, e.g. digitsCount[5] counts how many occurances of 5 are in the input.