Skip to content
Veltoryx Technologies
ProProblem 20● EasyLeetCode #925 ↗3 min readUpdated 30 October 2026

Long Pressed Name

Check whether typed text could be a name with some keys held down, walking the name and the typed text side by side.

01The problem

Your friend typed their name, but some keys may have been long pressed, repeating a letter one or more extra times. Given what was typed, return true if it could be the name with some long presses.

nametypedOutputWhy
"alex""aaleex"truea and e held
"saeed""ssaaedd"falseone e missing

Constraints: length 1 to 1000, lowercase letters; typed may be longer.

Loading the rest of the lesson…