index

JavaF

Find Palindrome and its index

A String is given S, we have to find the palindrome in that and print the starting and ending index. Example I/O: Example I/O: Sample Input 1:…