4 ms·
I was just analizing the Luhn algorithm and... the step to reverse the digits doesn't seem to do anything, right? None of the other steps depend on it and in th
by slazaro 4y ago
I was just analizing the Luhn algorithm and... the step to reverse the digits doesn't seem to do anything, right? None of the other steps depend on it and in the end you just sum all of the digits together... Is it because the amount of initial digits might not have the same parity and therefore you'd sum a different set of digits depending on whether you reverse or not?
- account42 4y agoI think it only matters for which digits you double if there are an even number of digits.