Ad
  • Custom User Avatar

    This uses n mod (10 raised to the power of the number of digits in n). So if n = 25, then 625 % 100 (where 100 is the result of 10 ^ 2). The idea being that anything in a place value greater than n is not of interest in the comparison. That's not a great written explanation but hopefully helps clarify.