package leetcode;

/**
 * https://leetcode.com/problems/valid-palindrome-ii/
 */
public class Problem680 {
    public boolean validPalindrome(String s) {
        // TODO
        return false;
    }

    public static void main(String[] args) {
        Problem680 prob = new Problem680();
        System.out.println(prob.validPalindrome("aba")); // true
        System.out.println(prob.validPalindrome("abca")); // true
    }
}

@@ -159,198 +159,535 @@
     
-// TODO%0A        return false;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Problem680 prob = new Problem680();%0A        System.out.println(prob.validPalindrome(%22aba%22)); //
+boolean found = true;%0A        int i = 0;%0A        int j = s.length() - 1;%0A        for (; i %3C= j; i++, j--) %7B%0A            if (s.charAt(i) != s.charAt(j)) %7B%0A                found = false;%0A                break;%0A            %7D%0A        %7D%0A        if (!found) %7B%0A            boolean found1 = true;%0A            for (int x = i + 1, y = j; x %3C= y; x++, y--) %7B%0A                if (s.charAt(x) != s.charAt(y)) %7B%0A                    found1 = false;%0A                    break;%0A                %7D%0A            %7D%0A            boolean found2 =
  true
+;
 %0A   
@@ -695,65 +695,271 @@
     
-System.out.println(prob.validPalindrome(%22abca%22)); //
+    for (int x = i, y = j - 1; x %3C= y; x++, y--) %7B%0A                if (s.charAt(x) != s.charAt(y)) %7B%0A                    found2 = false;%0A                    break;%0A                %7D%0A            %7D%0A            return found1 %7C%7C found2;%0A        %7D%0A        return
  true
+;
 %0A   

Solve problem 680