0925. Long Pressed Name
https://leetcode.com/problems/long-pressed-name
Description
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
name
andtyped
contain only lowercase English letters.
ac
Last updated