3 ms·
You are right, this won't work, you do not know what is in the check digit. There is actually a very clever way to do this, which involves using pointers that g
by hristov 16y ago
You are right, this won't work, you do not know what is in the check digit. There is actually a very clever way to do this, which involves using pointers that go back and forth to avoid the random value problem.
I do not have time to explain it, (and since it involves pointers, it would be pretty hard to explain without a white board) but I encourage anyone interested to look into the Knuth book and check it out.
- user24 16y agoyeah I was reading up on a solution which sounds pretty much like what you're talking about. Trouble with these things is that if you think you've solved it, there's no way to find out without spoiling it if you haven't. (apart from thinking about it longer and harder)
- deleted 16y ago[deleted]