private static String reverse(String in) {
        char[] chrs = new char[in.length()];
        for (int i = 0; i < in.length(); i++) {
            chrs[in.length() - i - 1] = in.charAt(i);
        }
        return String.valueOf(chrs);
    }
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.
java8/src/main/java/com/shekhargulati/leetcode/algorithms/Problem05.java