package leetcode;

/**
 * https://leetcode.com/problems/shortest-palindrome/
 */
public class Problem214 {
    public String shortestPalindrome(String s) {
        // TODO
        return null;
    }

    public static void main(String[] args) {
        Problem214 prob = new Problem214();
        System.out.println(prob.shortestPalindrome("aacecaaa")); // "aaacecaaa"
        System.out.println(prob.shortestPalindrome("abcd")); // "dcbabcd"
    }
}
@@ -145,24 +145,130 @@
 String s) %7B%0A
+        int i = 0;%0A        int j = s.length() - 1;%0A        String answer = s;%0A        while (i %3C j) %7B%0A    
         // T
@@ -271,16 +271,26 @@
 // TODO%0A
+        %7D%0A
         
@@ -300,12 +300,14 @@
 urn 
-null
+answer
 ;%0A  
@@ -400,16 +400,18 @@
 m214();%0A
+//
         
@@ -556,15 +556,319 @@
 cbabcd%22%0A
+//        System.out.println(prob.shortestPalindrome(%22aabaa%22)); // %22aabaa%22%0A//        System.out.println(prob.shortestPalindrome(%22aaaa%22)); // %22aaaa%22%0A//        System.out.println(prob.shortestPalindrome(%22aaba%22)); // %22abaaba%22%0A//        System.out.println(prob.shortestPalindrome(%22aababa%22)); // %22ababaababa%22%0A
     %7D%0A%7D

Update problem 214