We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Strings: Making Anagrams
- Discussions
Strings: Making Anagrams
Strings: Making Anagrams
Sort by
recency
|
2149 Discussions
|
Please Login in order to post a comment
Python solution using one dictionary to count all the letters in the first string, remove all the letters in the second string, and them summing up the absolute counts of each letter for the answer.
Here is simple C# code, that does the trick. Here I am deleting characters thats are found from both the strings (1 character each). We will be left with characters that are now found in both.
public static int makeAnagram(string a, string b) { string sS1 = ""; string sS2 = "";
Python solution