@@ -0,0 +1,682 @@
+public class Solution %7B%0A    private int lo = 0, maxLen = 0;%0A    public String longestPalindrome(String s) %7B%0A        for(int i = 0; i %3C s.length(); i++) %7B%0A            extendPalindrome(i, i, s); // assume the length of result is odd%0A            extendPalindrome(i, i + 1, s); // assume the length of result is even%0A        %7D%0A        return s.substring(lo, lo + maxLen); // %5Bstart, end)%0A    %7D%0A    %0A    public void extendPalindrome(int j, int k, String s) %7B%0A        while(j %3E= 0 && k %3C s.length() && s.charAt(j) == s.charAt(k)) %7B%0A            j--;%0A            k++;%0A        %7D%0A        if(maxLen %3C k - j - 1) %7B%0A            lo = j + 1;%0A            maxLen = k - j - 1;%0A        %7D%0A    %7D%0A    %0A%7D%0A

Create LongestPalindromicSubstring.java