Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But the resulting algorithm is just... weird. It operates under the assumption that the elements f.i can be arbitrary e.g. negative or greater than 9 — which they can't. And adopting that assumption allows you to dispense with keeping track of the variations of the total sum and merely track the separate digits themselves, which would allow a non-mechanical programmer to see easily that the algorithm is correct.


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

Search: