Hacker News new | past | comments | ask | show | jobs | submit login

And there are graphs going either way, either starting from most or least significant digit. (Take previous modulus, *10 mod N, + next digit mod N), or (Take previous modulus, + 10^(next digit) mod N)



In the case of least significant to most significant, that means you need more nodes, because the position of the current digit is another piece of state you also have to keep track of.


Yes - you need to work powers of 10 modulo the divisor as well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: