Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamped the check digit calculation #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Revamped the check digit calculation #10

wants to merge 3 commits into from

Conversation

gtmsingh
Copy link

inspired by: #8

  • Added V as the replacement for Y character (thus appropriately reducing number of symbols)
  • Made the modulo operation (in checkDigitAlg1) to auto adjust to the size of the symbols array and thus including all the symbols in a pseudo random fashion.
  • Added a concise guideline regarding why not to use 32 (or any 2^x number) as modulo with the link to the issue discussing about the same.

inspired by: #8
* Added `V` as the replacement for `Y` character (thus appropriately reducing number of symbols)
* Made the modulo operation (in `checkDigitAlg1`) to auto adjust to the size of the symbols array and thus including all the symbols in a pseudo random fashion.
* Added a concise guideline regarding why not to use 32 (or any 2^x number) as modulo with the link to the issue discussing about the same.
Since `Y` is being replaced by `V` previous parts containing `Y` would not have same check digit
Mistakenly updated the check digit for a `Y`character containing part that should fail according to the test case scenario
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant