@@ -0,0 +1,996 @@
+/**%0A * %0A */%0Apackage algorithms.strings;%0A%0Aimport java.util.Scanner;%0A%0A/**%0A * Challenge: https://www.hackerrank.com/challenges/anagram%0A * %0A * @author Sudharsanan Muralidharan%0A */%0Apublic class Anagram %7B%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%5B%5D arr = new int%5B26%5D;%0A      if (s.length() %25 2 != 0) %7B%0A        System.out.println(-1);%0A      %7D else %7B%0A        for (int i = 0; i %3C s.length() / 2; i++) %7B%0A          char c = s.charAt(i);%0A          int index = c - 'a';%0A          arr%5Bindex%5D++;%0A        %7D%0A%0A        for (int i = (s.length() / 2); i %3C s.length(); i++) %7B%0A          char c = s.charAt(i);%0A          int index = c - 'a';%0A          if (arr%5Bindex%5D %3E 0) %7B%0A            arr%5Bindex%5D--;%0A          %7D%0A        %7D%0A%0A        int count = 0;%0A        for (int i = 0; i %3C 26; i++) %7B%0A          count += arr%5Bi%5D;%0A        %7D%0A%0A        System.out.println(count);%0A      %7D%0A    %7D%0A    in.close();%0A  %7D%0A%7D%0A

Add solution for Anagram