Check whether a string can become a palindrome by deleting at most one character.
Type any string below and watch the pointers close in — when they disagree, the algorithm
forks: it tries skipping left, then skipping right.
Execution
idle
Press Run to begin.
0 / 0
Speed
Java · running line
comparingmatchedmismatchskipped char
O(n) time · O(1) extra space · the fork adds at most one extra linear pass, so it stays linear overall.