Decode ways with wildcards
Your task
A message of digits is encoded to letters via 'A'->1 ... 'Z'->26. The encoded string may contain '', which stands for any digit 1-9. Return the number of ways to decode the string, modulo 1000000007. A '0' alone is invalid; valid two-digit groups are 10-26. 1 <= len(s) <= 100000, characters are digits or ''. Example: '1*' -> 18 (1 then 1-9 = 9 ways, plus 11-19 = 9 ways).
Examples
num_decodings_ii(s: str) -> intExample 1
Input
num_decodings_ii("1*")Output
18