FA-72802 / Check-digit algorithms / Member archive
Missing-digit recovery measures the unknown from the left · case 02
Recovery succeeds only when the number length makes left and right parity agree.
Case contract
Recover the single unknown digit (marked "?") in a Luhn-protected number: input must be at least two characters, ASCII digits and exactly one "?" (else None). Return the digit 0-9 that makes the whole number Luhn-valid; when the unknown sits in a doubled position the needed contribution must be mapped back through the doubling map.
Why this case matters
Customer-service tools reconstruct a smudged or misheard digit of an account number.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression ["3077312?96877436"] | 5 | 1 | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗