← Questions
Predictive text for a phone keypad
0
I was asked this
No reports yet. Sign in to say where you were asked it.
On a phone keypad each digit maps to several letters (2 = abc, 3 = def, ...). Given a dictionary and a sequence of digit presses, return the words the sequence could spell, T9 style. Build a trie (or index words by their digit sequence) so lookups are fast, and discuss suggesting longer words that start with the sequence.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding
