A message containing uppercase English letters from 'A' to 'Z' can be encoded into digits using the following mapping:
'A' $1$
'B' $2$
…
'Z' $26$
To decode an encoded message, all digits must be grouped and mapped back into letters according to the reverse mapping. Multiple valid decodings may exist.
In addition to the digits from $0$ to $9$, an encoded string may also contain the wildcard character '*', which can represent any single digit from $1$ to $9$ inclusive.
Given a string s containing digits and '*' characters, return the total number of ways to decode it. Since the result can be very large, return it modulo
Note: A valid grouping cannot contain leading zeros (for example,
"06"cannot be mapped to'F'because"6"alone is valid, but"06"is invalid).
Constraints:
s.length
s[i] is a digit or '*'
A message containing uppercase English letters from 'A' to 'Z' can be encoded into digits using the following mapping:
'A' $1$
'B' $2$
…
'Z' $26$
To decode an encoded message, all digits must be grouped and mapped back into letters according to the reverse mapping. Multiple valid decodings may exist.
In addition to the digits from $0$ to $9$, an encoded string may also contain the wildcard character '*', which can represent any single digit from $1$ to $9$ inclusive.
Given a string s containing digits and '*' characters, return the total number of ways to decode it. Since the result can be very large, return it modulo
Note: A valid grouping cannot contain leading zeros (for example,
"06"cannot be mapped to'F'because"6"alone is valid, but"06"is invalid).
Constraints:
s.length
s[i] is a digit or '*'