Ad
  • Custom User Avatar

    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.'

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Changed the 1st paragraph of the description to this:

    The function findDigit takes two numbers as input, num and nth. It outputs the nth digit of num (counting from right to left).

    I hope it now becomes clearer. :)

  • Custom User Avatar

    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?

  • Custom User Avatar

    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.