Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.
class Solution {
public String longestPalindrome(String s) {
int max_len = 0;
String max_str = null;
for(int i=0; i<s.length(); i++) {