Class Solution

java.lang.Object
g0601_0700.s0680_valid_palindrome_ii.Solution

public class Solution extends Object
680 - Valid Palindrome II.<p>Easy</p> <p>Given a string <code>s</code>, return <code>true</code> <em>if the</em> <code>s</code> <em>can be palindrome after deleting <strong>at most one</strong> character from it</em>.</p> <p><strong>Example 1:</strong></p> <p><strong>Input:</strong> s = &ldquo;aba&rdquo;</p> <p><strong>Output:</strong> true</p> <p><strong>Example 2:</strong></p> <p><strong>Input:</strong> s = &ldquo;abca&rdquo;</p> <p><strong>Output:</strong> true</p> <p><strong>Explanation:</strong> You could delete the character &lsquo;c&rsquo;.</p> <p><strong>Example 3:</strong></p> <p><strong>Input:</strong> s = &ldquo;abc&rdquo;</p> <p><strong>Output:</strong> false</p> <p><strong>Constraints:</strong></p> <ul> <li><code>1 <= s.length <= 10<sup>5</sup></code></li> <li><code>s</code> consists of lowercase English letters.</li> </ul>
  • Constructor Details

    • Solution

      public Solution()
  • Method Details

    • validPalindrome

      public boolean validPalindrome(String s)