# Anagram difference

Given two List of strings a and b, we need to find the minimum number of manipulations required to make each two strings anagram from the two lists.

`Input :        a = "a", "jk", "abb", "mn", "abc"       b= "bb", "kj", "bbc", "op", "def"Output : [ -1, 0, 1, 2, 3]Explanation: Both String contains identical charactersInput :       s1 = "a"       s2 = "bb"Output : -1Explanation : As the length of both the strings are not same op is -1.Input :       s1 = "jk"       s2 = "kj"Output : 0Explanation : Both String contains identical characters.Input :       s1 = "abb"       s2 = "bbc"Output : 1Explanation : Here, we need to change one characterin either of the strings to make them identical. We can change 'a' and 'c' in s1 or 'c' and 'a' in s2.Input :       s1 = "mn"       s2 = "op"Output : 2Input :       s1 = "abc"       s2 = "def"Output : 3`

Time Complexity: O(n), where n is the length of the string.

--

--

## More from Jaydeep

Full Stack Programmer, love to solve problem’s during free time.

Love podcasts or audiobooks? Learn on the go with our new app.

## Jaydeep

Full Stack Programmer, love to solve problem’s during free time.