Back to problems

Email Checksum + Verification-String Lookup

Algorithm · Google · Medium

Requirements Implement a function that accepts an email content string, a verification string, and an integer chunk size k, then returns the decoded verification string. Process every non-overlapping window of up to k characters in email: Convert each character with the fixed mapping a–z → 1–25 for lowercase letters, and : → 26, / → 27, . → 28. Add the mapped values in the current window to obtain its checksum. Use the checksum as an index into verification. When the…

Checking your access…