Long Pressed Name
Your friend is typing his name
into a keyboard. Sometimes, when typing a character c
, the key might get long pressed, and the character will be typed 1 or more times.
You examine the typed
characters of the keyboard. Return True
if it is possible that it was your friends name, with some characters (possibly none) being long pressed.
Example 1:
Example 2:
Example 3:
Example 4:
Constraints:
1 <= name.length <= 1000
1 <= typed.length <= 1000
The characters of
name
andtyped
are lowercase letters.
Last updated