Find Encrypted Password
Reported by candidates from Amazon's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
Amazon's 'Find Encrypted Password' question hit the OA circuit in March 2024, and it's a pattern-matching problem disguised as a cipher task. You're given an encrypted string and need to reverse-engineer or decode it to find the original password. The catch is figuring out the encryption rule from limited examples or a description. Candidates often overthink the cipher itself when the real work is string manipulation and pattern recognition. StealthCoder can catch the encryption logic in real time if you blank on the algorithm, so you don't lose points to a panic spiral.
Pattern and pitfall
This problem usually boils down to either a substitution cipher, a shift cipher (Caesar-style), or a character-position transformation. The trick is not the cryptography, it's parsing the pattern quickly. Most candidates waste time building a full decryption engine when they should be pattern-matching first: does every character shift by N? Do vowels transform differently? Is position relevant? The common pitfall is assuming the encryption is complex when it's almost always a simple, deterministic rule applied consistently. You'll need string iteration, possibly a hash table to map characters, and logic to reverse the transformation. If you hit a blank during the OA, StealthCoder reads the problem and input examples and suggests the pattern without you typing a full solution from scratch.
If this hits your live OA and you blank, StealthCoder solves it in seconds, invisible to the proctor.
You can drill Find Encrypted Password cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it.
Get StealthCoderRelated leaked OAs
You've seen the question.
Make sure you actually pass Amazon's OA.
Amazon reuses patterns across OAs. Built by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Find Encrypted Password FAQ
What if the problem doesn't explicitly tell me the encryption rule?+
Look at the input examples. Map characters from the encrypted string to the original. If 'a' always becomes 'd', it's likely a Caesar shift of 3. Build a small mapping from the examples, then apply it to the full encrypted string. The rule is always consistent.
Is this a hash table problem or a string problem?+
Both. You'll iterate the encrypted string (string), and likely use a hash map to store character-to-character mappings. The primary work is understanding the cipher rule, not the data structure.
How do I prepare for this in 48 hours if I've never done a cipher problem?+
Don't study ciphers. Practice simple string transformations: reversing strings, character replacement with a mapping, position-based shifts. The OA isn't testing crypto knowledge, it's testing your ability to spot a pattern and code it cleanly.
What's the most common mistake candidates make?+
Overcomplicating the cipher. Candidates assume it's mathematically hard when it's usually just a lookup table or a consistent shift per character. Start by manually decoding one or two characters by hand, then generalize.
Do I need to handle edge cases like special characters or numbers?+
Probably. Test your cipher rule against non-alphabetic characters in the examples. If the rule applies to all characters, code it generally. If only letters shift, handle them separately. The problem description or examples will hint at this.