package String; /* An anagram of a string is another string that contains same characters, only the order of characters can be different. for example - "Mother in law" and "Hitler Woman" are anagram. */ import java.util.Scanner; public class Anagram { public static String lowerCase(String s) { char[] c = s.toCharArray(); for (int i = 0; i = 'a' && c[i] c[j]) { char t = c[i]; c[i] = c[j]; c[j] = t; } } return new String(c); } public static boolean checkAnagram(String f, String s) { String s1 = removeSpace(f); String s2 = removeSpace(s); if (s1.length() != s2.length()) { return false; } s1 = sort(s1); s2 = sort(s2); for (int i = 0; i