Decode Ways II
A message containing letters from A-Z can be encoded into numbers using the following mapping:
'A' -> "1"'B' -> "2"...'Z' -> "26"
To decode an encoded message, all the digits must be grouped and then mapped back into letters using the reverse of the mapping above. There may be multiple ways to decode a message.
For example, the grouping (1 11 06) is invalid because "06" cannot be mapped into 'F' since "6" is different from "06".
In addition to the mapping above, an encoded message may contain the '*' character, which can represent any digit from '1' to '9'; '0' is excluded. Decoding a string containing '*' is equivalent to decoding any of the encoded messages it can represent.
Given a string s consisting of digits and '*' characters, return the number of ways to decode it.
Since the answer may be very large, return it modulo 10^9 + 7.
s = "*"9s = "1*"18Constraints
- 1 <= s.length <= 10^5
- s[i] is a digit or '*'.