Back to DSA sheet

Decode Ways

MediumDynamic Programming
Open on LeetCodeAmazonGoogleMeta

Count the ways to decode a digit string into letters, where 'A'..'Z' map to '1'..'26'.

Constraints
  • 1 <= s.length <= 100
  • s contains only digits
Sheets
Blind 75NeetCode 150NeetCode 250
decode-ways.cpp
Loading editor
Custom input (stdin)
Output

Run your code to see its output.