The problem. Given a string s of lowercase letters, return true if it can become a palindrome after deleting at most one character.
s = "aba" -> true (already a palindrome)
s = "abca" -> true (delete "b" or "c")
s = "abc" -> false (needs two deletions)Members only · free account
The rest of this lesson, with 6 more sections, 1 drawing, a dry-run simulator and code in JavaScript, Python, Java and C++, opens with a free account.
Not ready yet? The Arrays course is free to read, no account needed.
In the rest of this lesson