Alphanumeric Combinations

Problem Overview

  • Count the number of valid decodings of a digit string where 1–26 map to letters a–z.
  • Input: a digit string S (0–9); Output: a single integer count of possible words; return 0 if none.
  • Context: models number-to-letter learning and alphanumeric combinations in English words.
  • A classic coding interview problem and interview question asked in Goldman interviews.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: