Decode Ways

You are given a digit string s. Read it as a code where 1 maps to A, 2 maps to B, and so on through 26 mapping to Z.

Count how many different ways you can split the string into valid chunks and decode each chunk into a letter. A chunk cannot start with 0, and any two-digit chunk must stay within the range 10 to 26.

Examples
Input: "12"
Output: 2
Hints
Related Problems

Decode Ways

You are given a digit string `s`. Read it as a code where `1` maps to `A`, `2` maps to `B`, and so on through `26` mapping to `Z`.