[Hackerrank] - Making Anagrams Solution
Given two strings, determine the total number of characters to be deleted such that they become anagrams. We use counting sort to create buckets of each character frequency to derive an optimal solution.
Question: Given a two strings, find the minimum number of characters that must be deleted to make them anagrams.Input: str1 = “a b c”, str2 = “a m n o p”Output: 6 Let us try to understand this problem statement and its test case first. We have two strings of english alphabet which may or may not have the same length. Anagrams are two words with same characters and frequencies. It is not…
View On WordPress













