true, but how do you know there is no case of 3 or more digits which is stationary? even if it's true, it deserves an explanation in the code.
In the case of two digits, the number of digits multiplied by 1 plus ten digits multiplied by 10, is no change.
48 is the ascii code for "0". So : "0".toLong()-48 = 0L "8".toLong()-48 = 8L
cool inline function, but what's with that magic number 48?
Are you sure that (v < 100) is the same as "the solution is stable" (v == n)?
Loading collection data...
true, but how do you know there is no case of 3 or more digits which is stationary?
even if it's true, it deserves an explanation in the code.
In the case of two digits, the number of digits multiplied by 1 plus ten digits multiplied by 10, is no change.
48 is the ascii code for "0". So :
"0".toLong()-48 = 0L
"8".toLong()-48 = 8L
cool inline function, but what's with that magic number 48?
Are you sure that (v < 100) is the same as "the solution is stable" (v == n)?