Alice is typing a text message on a classic mobile phone keypad. Each digit from '2' to '9' is mapped to a specific set of lowercase English letters:
'2' maps to 'a', 'b', 'c'
'3' maps to 'd', 'e', 'f'
'4' maps to 'g', 'h', 'i'
'5' maps to 'j', 'k', 'l'
'6' maps to 'm', 'n', 'o'
'7' maps to 'p', 'q', 'r', 's'
'8' maps to 't', 'u', 'v'
'9' maps to 'w', 'x', 'y', 'z'
To type a character, a button is pressed consecutively between
Given a string pressedKeys representing the sequence of button presses, return the total number of possible text messages Alice could have sent.
Since the result can be very large, return it modulo
Constraints:
pressedKeys.length
pressedKeys only consists of digits from '2' to '9'
Alice is typing a text message on a classic mobile phone keypad. Each digit from '2' to '9' is mapped to a specific set of lowercase English letters:
'2' maps to 'a', 'b', 'c'
'3' maps to 'd', 'e', 'f'
'4' maps to 'g', 'h', 'i'
'5' maps to 'j', 'k', 'l'
'6' maps to 'm', 'n', 'o'
'7' maps to 'p', 'q', 'r', 's'
'8' maps to 't', 'u', 'v'
'9' maps to 'w', 'x', 'y', 'z'
To type a character, a button is pressed consecutively between
Given a string pressedKeys representing the sequence of button presses, return the total number of possible text messages Alice could have sent.
Since the result can be very large, return it modulo
Constraints:
pressedKeys.length
pressedKeys only consists of digits from '2' to '9'