The Duolingo Senior SWE phone screen focused on an encryption and decryption design problem built around character mappings and a fixed dictionary of valid words. The main challenge was not just producing an encrypted string, but efficiently determining how many dictionary words could decrypt into a given encoded value when multiple characters might map to the same two-character token.
Interview Details
Coding — Encrypt and Decrypt Strings
You are given:
keys
values
dictionary
keys
values
dictionary
keys contains unique lowercase characters.
values contains two-character encoded strings, with one entry corresponding to each character in keys.
dictionary contains the valid plaintext words that should be considered during decryption.