public static String longestPalindromeI(String s) {
		if(s == null || s.length() <= 1) {
	        return s;
	    }
	    int len = s.length();
	    int start = 0, end = 0;
	    boolean[][] palindrome = new boolean[len][len];
	    for(int i=0;i<len;i++) {
	        palindrome[i][i] = true;
	    }
	    for(int i=1;i<len;i++) {
	        if(s.charAt(i-1) == s.charAt(i)) {
	            palindrome[i-1][i] = true;
	            start = i-1; end = i+1;
	        }
	    }
	    for(int k=2;k<len;k++) {
	        for(int i=0;i+k<len;i++) {
	            int j = i+k;
	            if(s.charAt(i) == s.charAt(j) && palindrome[i+1][j-1]) {
	                palindrome[i][j] = true;
	                start = i; end = j+1;
	            }
	        }
	    }
	    return s.substring(start, end);
	}