Count Letter Decodings of a Digit String
Asked at Goldman Sachs · Coding Questions · Difficulty: Medium · Last asked Jul 11, 2025
A message made of capital letters was encoded by replacing each letter with its position in the alphabet: `A` becomes `"1"`, `B` becomes `"2"`, ..., `Z` becomes `"26"`, and the numbers were written one after another with no separators. Given only the resulting digit string, count how many different letter messages could have produced it.
Loading the problem…
More Goldman Sachs interview questions
- Probability and Statistics Drill: Eight Numeric Problems
- Merge K Sorted Lists (including K=3)
- Goldman Hirevue Behavioral Bank (6 Questions)
- Goldman Sachs HireVue Behavioral and Recursion
- Explain Recursion to a Non-CS Audience
- Implement a Deque From Scratch