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
|
2148 Discussions
|
Please Login in order to post a comment
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
Well for this one Very simple solution is to add the Char count in hasmap and remove which is there on the first one.