Longest palindromic substring - Java Quiz Question



Write a program to find longest substring which is a palindrome.

Input (String) Output (String)
MERITCAMPUSSUPMACMERIT CAMPUSSUPMAC
SCAJAVAAVAJAVS AJAVAAVAJA
HARDDRAARDD DDRAARDD
PRINTTNIPRI INTTNI

class FindLongestPalindromicSubstring

{    public static void main(String s[])
    {
        String input = "MERITCAMPUSSUPMACMERIT";
        System.out.println("Longest Palindromic Substring present in " + input + " is " + getLongestPalindromicSubstring(input));

    }


public static String getLongestPalindromicSubstring(String input) {
//Write code here to get longest palindromic substring
}

//If required, write any additional methods here
}