Ask AI
Open a hint-first prompt in a new AI chat. Grok may ask you to confirm before sending.
Open Claude Desktopstrings · grouping · frequency-counting
The organizer’s problem statement is available at the official source link.
phone key groups
Find the key sequence matching the most dictionary words
Map each dictionary word to its phone-key sequence, group equal sequences, and choose a largest group.
| Dictionary word | Phone key sequence | Group count |
|---|---|---|
| word w | key(w) | count matching words |
| all w | group by key(w) | choose maximum group |
- 1
Map each word to keys
Replace each letter by the number key assigned to its letter group. - 2
Group equal sequences
Words that map to the same digit string form one group. - 3
Choose the largest group
Output a digit string whose group contains the most dictionary words.
Tools
1
2
3
4
5
6
7
8
9
10
11
12
Draft saved locally
|12 lines, 156 charsRun output
Run your code to see output.