Back to Problem Solutions forum
For some reason I've got an error in this test case:
Was: 1097696166985934
Expected: 1907696166985934
But hash sum of both numbers is 80.
So my answer was obviously 1097696166985934
How should I detect swap error in such test cases?
In my opinion this test case shows how inapplicable Luhn Algorithm for error's detection.
While writting this topic I've found the confrmation of my words in this article Luhn Algorithm
I guess you should rework your test cases.