回文数2


Submit solution

Points: 10
Time limit: 1.0s
Memory limit: 4M

Author:
Problem type
Allowed languages
C, C++

回文数2

给定一个字符串 s,删除最多一个字符后,如果字符串可以变成回文字符串,则返回 true;否则返回 false。

示例 1:
输入:
aba
输出:
true
示例 2:
输入:
abca
输出:
true
解释: 你可以删除字符 'c'。
示例 3:
输入:
abc
输出:
false
约束条件:

\(1 <= s.length <= 10^5\) s 由小写英文字母组成。


Comments

There are no comments at the moment.