Available question text
Given a string of pressed keys (digits 2–9), count how many original letter messages could produce it, where consecutive identical digits can be grouped into letters requiring 1–3 presses (or 1–4 presses for keys 7 and 9). Compute the total number of valid partitions modulo 1e9+7 (typical solution: DP over runs with per-key max group length, n up to 1e5).
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2266. Count Number of Texts
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source