@@ -0,0 +1,2069 @@
+package algorithms.strings;%0D%0A%0D%0Aimport java.util.Scanner;%0D%0A%0D%0A/*%0D%0A * Problem Statement:%0D%0A * Alice recently started learning about cryptography and found that anagrams%0D%0A * are very useful. Two strings are anagrams of each other if they have same%0D%0A * character set and same length. For example strings %22bacdc%22 and %22dcbac%22 are%0D%0A * anagrams, while strings %22bacdc%22 and %22dcbad%22 are not.%0D%0A * %0D%0A * Alice decides on an encryption scheme involving 2 large strings where%0D%0A * encryption is dependent on the minimum number of character deletions required%0D%0A * to make the two strings anagrams. She need your help in finding out this%0D%0A * number.%0D%0A * %0D%0A * Given two strings (they can be of same or different length) help her in%0D%0A * finding out the minimum number of character deletions required to make two%0D%0A * strings anagrams. Any characters can be deleted from any of the strings.%0D%0A * %0D%0A * Input Format:%0D%0A * Two lines each containing a string.%0D%0A * %0D%0A * Constraints:%0D%0A * 1 %3C= Length of A,B %3C= 10000%0D%0A * A and B will only consist of lowercase latin letter.%0D%0A * %0D%0A * Output Format:%0D%0A * A single integer which is the number of character deletions.%0D%0A * %0D%0A * Sample Input: %0D%0A * cde%0D%0A * abc%0D%0A * %0D%0A * Sample Output: %0D%0A * 4%0D%0A */%0D%0Apublic class MakeItAnagram %7B%0D%0A%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%0D%0A%09%09Scanner sc = new Scanner(System.in);%0D%0A%0D%0A%09%09String inputA = sc.nextLine();%0D%0A%09%09String inputB = sc.nextLine();%0D%0A%09%09System.out.println(minCharsDeletedForAnagram(inputA, inputB));%0D%0A%0D%0A%09%09sc.close();%0D%0A%09%7D%0D%0A%0D%0A%09private static int minCharsDeletedForAnagram(String strA, String strB) %7B%0D%0A%0D%0A%09%09int%5B%5D charsA = new int%5B26%5D;%0D%0A        int%5B%5D charsB = new int%5B26%5D;%0D%0A        int charsRequiredToDelete = 0;%0D%0A        %0D%0A        for (int i = 0; i %3C strA.length(); i++) %7B%0D%0A            charsA%5BstrA.charAt(i) - 97%5D++;%0D%0A        %7D%0D%0A        %0D%0A        for (int i = 0; i %3C strB.length(); i++) %7B%0D%0A            charsB%5BstrB.charAt(i) - 97%5D++;%0D%0A        %7D%0D%0A%0D%0A        for (int i = 0; i %3C charsA.length; i++) %7B%0D%0A        %09charsRequiredToDelete += Math.abs(charsA%5Bi%5D - charsB%5Bi%5D);%0D%0A        %7D%0D%0A%09%09return charsRequiredToDelete;%0D%0A%09%7D%0D%0A%7D

Add MakeItAnagram