@@ -0,0 +1,937 @@
+/**%0A * %0A */%0Apackage algorithms.strings;%0A%0Aimport java.util.Scanner;%0A%0A/**%0A * Challenge: https://www.hackerrank.com/challenges/palindrome-index%0A * %0A * @author Sudharsanan Muralidharan%0A */%0Apublic class PalindromeIndex %7B%0A  private static boolean matches(String s, int i, int j) %7B%0A    while (i %3C j) %7B%0A      if (s.charAt(i) != s.charAt(j)) %7B%0A        return false;%0A      %7D%0A      i++;%0A      j--;%0A    %7D%0A    return true;%0A  %7D%0A%0A  public static void main(String%5B%5D args) %7B%0A    Scanner in = new Scanner(System.in);%0A    int t = in.nextInt();%0A    while (t-- %3E 0) %7B%0A      String s = in.next();%0A      int index = -1;%0A      for (int i = 0, j = s.length() - 1; i %3C j; i++, j--) %7B%0A        if (s.charAt(i) != s.charAt(j)) %7B%0A          if (matches(s, i + 1, j)) %7B%0A            index = i;%0A          %7D else if (matches(s, i, j - 1)) %7B%0A            index = j;%0A          %7D%0A          break;%0A        %7D%0A      %7D%0A      System.out.println(index);%0A    %7D%0A    in.close();%0A  %7D%0A%7D%0A

Add solution for PalindromeIndex