Halloween Sale
Unlock all premium questions for over 30% off
Password Similarity Check
Medium
Question
To keep people from switching to a password that is barely different, a company compares each new password with the one it replaces. The pair is similar if you can edit the new password so that the old one shows up in it as a subsequence. The only edit allowed is to shift characters forward: for as many positions of the new password as you like, swap the letter for the next cyclic character of the alphabet, so 'm' turns into 'n', 'q' into 'r', and 'z' wraps around to 'a'.
...
Asked at:Amazon
More Amazon interview questions
- Pascal Triangle Digit Encryptioneasy
- Maximum Server Set Stabilitymedium
- Bring Down All Serversmedium
- Maximize Assigned Negative Signseasy
- Count Distinct Password Variantseasy
- Get Daily Total Requestsmedium
- Find Minimum Reverse Operationsmedium
- Simplified Regex Pattern Matchinghard
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.