Given the standard mapping from English letters to digits on a phone keypad:
(1 -> "",
2 -> a, b, c
3 -> d, e, f
4 -> g, h, i
5 -> j, k, l
6 -> m, n, o
7 -> p, q, r, s
8 -> t, u, v
9 -> w, x, y, z)
Write a program that outputs all words that can be formed from any n-digit phone number
from the list of given KNOWN_WORDS, considering the mapping mentioned above.
KNOWN_WORDS = ['careers', 'linkedin', 'hiring', 'interview', 'linkedgo']
phoneNumber: 2273377
Output: ['careers']
phoneNumber: 54653346
Output: ['linkedin', 'linkedgo']
This problem tests a candidate’s ability to map phone keypad digits to letters and efficiently match words against a given dictionary. The key is avoiding brute-force generation and instead using reverse mapping or preprocessing strategies. Interviewers focus heavily on reasoning clarity, optimization choices, and time complexity discussion. In live interviews, explaining the approach clearly is often more important than the final code.
VOPrep’s team has long accompanied candidates through real OA and VO interviews at top tech and finance companies, including OpenAI, Google, Amazon, Citadel, and SIG. We provide live interview assistance and proxy interview support, helping candidates maximize their chances of securing offers.