AO
Back

Phone Number to Known Words on a Keypad

Also reported as Phone Keypad Word Match · LeetCode 17 Variant

Phone ScreenPhone ScreenLast reported October 2026Medium Frequency

Problem Overview

The round: six LinkedIn phone-screen reports, November 2025 to October 2026, from junior to senior loops. One names only a phone-number problem, with no details. The other five give the same task: a list of known words and a phone number typed on a keypad; return the known words that number spells. Several reports call it a variant of LeetCode 17, Letter Combinations of a Phone Number, with the difference that only known words count. One senior screen gives two examples and a thread-safety follow-up. One graded part, then a follow-up that was discussed, not coded.

The keypad

2: abc   3: def   4: ghi   5: jkl
6: mno   7: pqrs  8: tuv   9: wxyz

0 and 1 have no letters.

Part 1 — known words for a number

class KeypadDictionary:
    def __init__(self, known_words: list[str]): ...
    def lookup(self, phone: str) -> list[str]: ...
  • KeypadDictionary(known_words) stores the known words. They are lowercase letters and distinct.
  • lookup(phone) takes a string of digits and returns every known word whose letters, typed on the keypad, give exactly phone. A word must have one letter per digit.
  • Return the words in any order (the tests sort them). Return [] when nothing matches.
  • Ours: assume lookup is called many times on one dictionary, so make each call fast. (One report asks about looking up a new number; another candidate optimized by computing each word's number up front.)

Examples, with known words ["careers", "linkedin", "linkedgo", "apple"]:

lookup("2273377")  -> ["careers"]
lookup("54653346") -> ["linkedin", "linkedgo"]
lookup("27753")    -> ["apple"]
lookup("2222")     -> []

Follow-up (discussed, not graded): how would you make the lookup thread-safe, for example with a shared cache or dictionary?

Notes: the task, the two 2273377 and 54653346 examples and the thread-safety follow-up are reported. One candidate wrote backtracking first, then optimized by computing each known word's number up front. Ours: the class and method names, the apple and 2222 examples, lowercase distinct words, that a word must be exactly as long as the number (every reported example is, but no report says so; ask), that a number containing 0 or 1 matches no word (tested), and the repeated-lookup assumption.

Follow-up Arc

Interviewers escalate through these phases. The order varies, but most candidates see at least one from each bucket.
Trade-off discussion · 1
Trade-off discussion

How would you make the lookup thread-safe, for example with a shared cache or dictionary?

Probes for: senior technical screen; discussed, not coded

What Reports Emphasize

What the reports say: a LinkedIn phone-screen staple: known words plus a keypad number, return the known words it spells. Reports call it a LeetCode 17 variant. One candidate wrote backtracking first, then optimized by computing each known word's number up front. One screen paired it with shortest word distance and asked for time complexity; a senior screen followed up on thread safety, with a ConcurrentHashMap as the example.

Common mistakes (ours): Generating every letter combination per lookup; Keeping one word per number; Forgetting the four-letter keys 7 and 9; Returning the internal list.

Edge cases to test (ours): Two words with the same number; A number with 0 or 1; No match; Words shorter or longer than the number

Practice

Write your own against 6 test cases, or read the worked solution — approach, complexity, and code that runs.
Did this match your interview?

If you have had this round, tell us how close this page was. It is how we keep the pages accurate.

Prepping for LinkedIn with friends?

Send them this page. It is free to read, no account needed.

More LinkedIn Questions

Free preview

Every question in the LinkedIn catalog gets this depth

What you just read — canonical solution, follow-up arc, what passing candidates actually did — exists for all 90 LinkedIn questions, refreshed monthly from new candidate reports.

$59/mo — or $50/mo with the 3-month pass · cancel anytime
LinkedIn · Phone Screen · Reported 6× across candidate reports
Is this helpful?