Valid Palindrome II Problem

Valid Palindrome II Problem — ExecCode Easy DSA Practice

Solve the Valid Palindrome II problem on ExecCode. Free online easy DSA practice in Two Pointers. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Description You are given a string s, return true if the s can be palindrome after deleting at most one character from it.

Examples

Input {"s": "aba"}; Output True. Input {"s": "abca"}; Output True. Input {"s": "abcda"}; Output False

Constraints

1 <= s.length <= 10^5 s consists of lowercase English letters.

Practice Valid Palindrome II free on ExecCode. Browse DSA problems, topic map, and placement guides.