Given a digit string, return the number of ways to decode it using the mapping 1 -> A through 26 -> Z. Pattern focus: Decode ways. This variant stresses longer strings and tricky zero handling.
s = digit string
number of valid decodings
Example 1:
Input:
s = "1111111111"
Output:
89
Explanation:
A long run of 1s follows the Fibonacci-style recurrence.
Example 2:
Input:
s = "11106"
Output:
2
Explanation:
Only two decodings remain valid because of the embedded zero.