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:
1 |
Input: name = "alex", typed = "aaleex" |
Example 2:
1 |
Input: name = "saeed", typed = "ssaaedd" |
Example 3:
1 |
Input: name = "leelee", typed = "lleeelee" |
Example 4:
1 |
Input: name = "laiden", typed = "laiden" |
1 |
class { |
近期评论