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 you should use the words 'place value' in your description. First digit, nth digit are ambiguous. All you need to do is to add 'by the first digit we mean the digit with the lowest place value.'
This comment is hidden because it contains spoiler information about the solution
Changed the 1st paragraph of the description to this:
The function
findDigit
takes two numbers as input,num
andnth
. It outputs the nth digit of num (counting from right to left).I hope it now becomes clearer. :)
I count the digits from right to left. I thought that was intuitive, because that is how numbers work. The first digit (units) appears at the most right, then you have at his left the ten's, and so on...
When you add another digit, you add it at the left, not at the right (ex. 999+1 = 1000) so I think it makes sense to count them from right to left and not otherwise.
But do you think I should change the description to make this more clear?
I think the person who made the kata starts counting digits starting from the last digit. I have no idea why, I also found it confusing.