text of lowercase English letters. You may erase at most one character from it (erasing nothing is also fine).
Return True if the string can then read the same forwards and backwards, and False otherwise.text="radlar" → True
Erase the l to get the palindrome radar.
text="noon" → True
The string already reads the same both ways; nothing needs erasing.
text="abcdba" → True
Whichever single letter you erase, the middle cd never matches.
text consists of lowercase English letterstext="radlar"
True
Run checks the first 3 tests in your browser. Submit checks all 110 tests on the server, hidden ones included.