Given two strings in lowercase, your task is to find minimum number of manipulations required to make two strings anagram without deleting any character. If two strings contains same data set in any order then strings are called Anagrams.
Example 1:
Input:
S1 = "aba", S2 = "baa", N = 3
Output: 0
Explanation: Both the strings are already
anagrams.
Ã¢â¬â¹Example 2:
Input: 
S1 = "ddcf", S2 = "cedk", N = 4
Output: 2
Explanation: We can change 'e' and 'k' in
S2 to 'd' and 'f' to make both the strings
anagram. 
Your Task:
You don't need to read input or print anything. Your task is to complete the function minManipulation() which takes the strings S1 and S2 and their length N as inputs and returns the minimum number of manipulations required to make both the strings anagram.
Expected Time Complexity: O(N).
Expected Auxiliary Space: O(1).
Constraints:
1<=N<=10^{5}
|S1| = |S2| = N
|S| represents the length of the string S.

Difficulty: EASY
Tags: String algorithms

Data structures
Skill types: Data structures
Expected Time Complexity: O(N).
Expected Auxiliary Space: O(1).

Starter code:
#User function Template for python3
class Solution:
    def minManipulation(self, N, S1, S2): 
        # code here

Solutions:
from collections import defaultdict

class Solution:

	def minManipulation(self, N, S1, S2):
		dictf = defaultdict(int)
		count = 0
		for i in range(N):
			dictf[S1[i]] += 1
		for j in range(N):
			if dictf[S2[j]] == 0:
				count += 1
			else:
				dictf[S2[j]] -= 1
		return count


class Solution:

	def minManipulation(self, N, str1, str2):
		for i in str2:
			if i in str1:
				str1 = str1.replace(i, '', 1)
				str2 = str2.replace(i, '', 1)
		return min(len(str1), len(str2))


class Solution:

	def minManipulation(self, n, s1, s2):
		lst = [0] * 26
		for i in s1:
			lst[ord(i) - 97] += 1
		for j in s2:
			lst[ord(j) - 97] -= 1
		cnt = 0
		for k in lst:
			if k > 0:
				cnt += k
		return cnt


class Solution:

	def minManipulation(self, N, S1, S2):
		li = []
		count1 = 0
		count2 = 0
		for i in range(26):
			li.append(0)
		for i in range(N):
			li[ord(S1[i]) - 97] += 1
			li[ord(S2[i]) - 97] -= 1
		for i in range(26):
			if li[i] > 0:
				count1 += li[i]
			if li[i] < 0:
				count2 += li[i]
		return max(count1, abs(count2))


class Solution:

	def minManipulation(self, n, s1, s2):
		k = {}
		for i in s1:
			if i in k:
				k[i] += 1
			else:
				k[i] = 1
		c = 0
		for i in s2:
			if i in k and k[i] > 0:
				k[i] -= 1
			else:
				c += 1
		return c


class Solution:

	def minManipulation(self, N, S1, S2):
		for i in S2:
			if i in S1:
				S1 = S1.replace(i, '', 1)
				S2 = S2.replace(i, '', 1)
		return min(len(S1), len(S2))


class Solution:

	def minManipulation(self, N, S1, S2):
		d = {}
		for i in range(N):
			if S1[i] in d:
				d[S1[i]] += 1
			else:
				d[S1[i]] = 1
		for i in range(N):
			if S2[i] in d:
				d[S2[i]] -= 1
			else:
				d[S2[i]] = -1
		c = 0
		e = 0
		for (i, j) in d.items():
			if j > 0:
				c += j
			elif j < 0:
				e += abs(j)
		return (c + e) // 2


class Solution:

	def minManipulation(self, N, S1, S2):
		freq1 = {}
		freq2 = {}
		for s in S1:
			if s not in freq1:
				freq1[s] = 1
			else:
				freq1[s] += 1
		for s in S2:
			if s not in freq2:
				freq2[s] = 1
			else:
				freq2[s] += 1
		ans = 0
		for k in freq1.keys():
			if k not in freq2.keys():
				ans += freq1[k]
			else:
				ans += max(0, freq1[k] - freq2[k])
		return ans


class Solution:

	def minManipulation(self, N, S1, S2):
		if sorted(S1) == sorted(S2):
			return 0
		d = {}
		for i in S1:
			if i not in d:
				d[i] = 1
			else:
				d[i] += 1
		c = 0
		for i in S2:
			if i in d and d[i] != 0:
				d[i] -= 1
			else:
				c += 1
		return c


class Solution:

	def minManipulation(self, N, S1, S2):
		from collections import Counter
		d1 = Counter(S1)
		d2 = Counter(S2)
		for (k, v) in d1.items():
			if k in d2:
				d1[k] -= min(v, d2[k])
				d2[k] -= min(v, d2[k])
		ans = 0
		for (k, v) in d1.items():
			if v != 0:
				ans += d1[k]
		return ans


class Solution:

	def minManipulation(self, N, s1, s2):
		dic = {}
		(a, b) = (0, 0)
		for i in range(N):
			if s1[i] not in dic:
				dic[s1[i]] = 1
			else:
				dic[s1[i]] += 1
			if s2[i] not in dic:
				dic[s2[i]] = -1
			else:
				dic[s2[i]] -= 1
		for i in dic:
			if dic[i] > 0:
				a += dic[i]
			elif dic[i] < 0:
				b += abs(dic[i])
		return (a + b) // 2


from collections import Counter

class Solution:

	def minManipulation(self, N, S1, S2):
		c1 = Counter(S1)
		c2 = Counter(S2)
		count = 0
		for item in c1:
			count += max(0, c1[item] - c2[item])
		return count


class Solution:

	def minManipulation(self, N, S1, S2):
		d = {}
		for i in S1:
			if i not in d:
				d[i] = 1
			else:
				d[i] += 1
		d1 = {}
		for i in S2:
			if i not in d1:
				d1[i] = 1
			else:
				d1[i] += 1
		s = 0
		for (i, j) in d.items():
			try:
				k = d[i] - d1[i]
				if k > 0:
					s = s + k
			except:
				s = s + j
		return s


class Solution:

	def minManipulation(self, N, S1, S2):
		word = [0] * 26
		i = 0
		while i < len(S1):
			word[ord(S1[i]) - ord('a')] += 1
			word[ord(S2[i]) - ord('a')] -= 1
			i += 1
		res = 0
		for i in word:
			if i > 0:
				res += i
		return res


class Solution:

	def minManipulation(self, N, S1, S2):
		c = 0
		if sorted(S1) == sorted(S2):
			return 0
		else:
			for i in S1:
				if i in S2:
					S1 = S1.replace(i, '', 1)
					S2 = S2.replace(i, '', 1)
				else:
					c += 1
		return c


class Solution:

	def minManipulation(self, N, S1, S2):
		dic = {}
		dic1 = {}
		cnt = 0
		for i in S1:
			if i in dic:
				dic[i] += 1
			else:
				dic[i] = 1
		for j in S2:
			if j in dic1:
				dic1[j] += 1
			else:
				dic1[j] = 1
		for i in dic:
			si = dic.get(i, 0) - dic1.get(i, 0)
			if si > 0:
				cnt += si
		return cnt


class Solution:

	def minManipulation(self, N, S1, S2):
		d1 = {}
		for c in S1:
			d1[c] = 1 + d1.get(c, 0)
		cnt = 0
		for c in S2:
			if c in d1 and d1[c] != 0:
				d1[c] -= 1
			elif c not in d1 or d1[c] == 0:
				cnt += 1
		return cnt


class Solution:

	def minManipulation(self, N, S1, S2):
		char_count = [0] * 26
		count = 0
		for i in S1:
			char_count[ord(i) - ord('a')] += 1
		for j in S2:
			char_count[ord(j) - ord('a')] -= 1
		for i in range(26):
			count += abs(char_count[i])
		return count // 2


from collections import Counter

class Solution:

	def minManipulation(self, N, S1, S2):
		n = len(S1)
		a = Counter(S1)
		b = Counter(S2)
		for i in a.keys():
			if a.get(i, 0) >= b.get(i, 0):
				n -= b[i]
			elif b.get(i, 0) > a.get(i, 0):
				n -= a[i]
		return n


class Solution:

	def minManipulation(self, N, S1, S2):
		d = {}
		d1 = {}
		for ele in S1:
			if ele in d:
				d[ele] += 1
			else:
				d[ele] = 1
		for ele in S2:
			if ele in d1:
				d1[ele] += 1
			else:
				d1[ele] = 1
		count = 0
		for (ele, value) in d.items():
			if d1.get(ele) != None:
				if d1[ele] != d[ele]:
					if d1[ele] < d[ele]:
						d[ele] -= d1[ele]
						d1[ele] = 0
					elif d[ele] < d1[ele]:
						d1[ele] -= d[ele]
						d[ele] = 0
				elif d[ele] == d1[ele]:
					d[ele] = 0
					d1[ele] = 0
		for value in d.values():
			count += value
		for value in d1.values():
			count += value
		return count // 2


class Solution:

	def minManipulation(self, N, S1, S2):
		d = {}
		for i in S1:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
		e = {}
		for i in S2:
			if i in e:
				e[i] += 1
			else:
				e[i] = 1
		c = 0
		for i in d:
			if i in e:
				if d[i] > e[i]:
					d[i] -= e[i]
					e[i] = 0
				else:
					e[i] -= d[i]
					d[i] = 0
		for i in e:
			c += e[i]
		return c


class Solution:

	def minManipulation(self, N, S1, S2):
		hm1 = {}
		hm2 = {}
		for i in S1:
			if i in hm1:
				hm1[i] += 1
			else:
				hm1[i] = 1
		for ele in S2:
			if ele in hm2:
				hm2[ele] += 1
			else:
				hm2[ele] = 1
		ans = 0
		for j in hm1:
			if j in hm2:
				if hm1[j] > hm2[j]:
					ans += hm1[j] - hm2[j]
			else:
				ans += hm1[j]
		return ans


class Solution:

	def minManipulation(self, N, S1, S2):
		count = [0] * 26
		for i in range(N):
			pos = ord(S1[i]) - ord('a')
			count[pos] += 1
			pos = ord(S2[i]) - ord('a')
			count[pos] -= 1
		a = 0
		b = 0
		for i in range(26):
			if count[i] > 0:
				a += count[i]
		return a


class Solution:

	def minManipulation(self, N, S1, S2):
		cnt = N
		for i in S1:
			if i in S2:
				cnt -= 1
				S2 = S2.replace(i, '', 1)
		return cnt


class Solution:

	def minManipulation(self, N, S1, S2):
		h = {}
		for i in S1:
			if i in h:
				h[i] += 1
			else:
				h[i] = 1
		for i in S2:
			if i in h:
				if h[i] > 0:
					h[i] -= 1
			else:
				h[i] = 0
		count = 0
		for i in h.values():
			count += i
		return count


class Solution:

	def minManipulation(self, N, S1, S2):
		d1 = {}
		d2 = {}
		for i in S1:
			if i not in d1:
				d1[i] = 1
			else:
				d1[i] += 1
		for i in S2:
			if i not in d2:
				d2[i] = 1
			else:
				d2[i] += 1
		count1 = 0
		for i in d1:
			if i not in d2:
				count1 += d1[i]
			else:
				a = d1[i]
				b = d2[i]
				if a > b:
					count1 += a - b
		count2 = 0
		for i in d2:
			if i not in d1:
				count2 += d2[i]
			else:
				a = d2[i]
				b = d1[i]
				if a > b:
					count2 += a - b
		return min(count1, count2)


class Solution:

	def minManipulation(self, N, S1, S2):
		m = {}
		for i in S1:
			if i in m:
				m[i] += 1
			else:
				m[i] = 1
		c = 0
		for i in S2:
			if i not in m:
				c += 1
			else:
				m[i] -= 1
				if m[i] == 0:
					del m[i]
		return c


class Solution:

	def minManipulation(self, N, S1, S2):
		a = S1
		b = S2
		set_a = set(a)
		set_b = set(b)
		string = ''
		sum = 0
		for i in set_a:
			count_a = a.count(i)
			if count_a > b.count(i):
				diff = count_a - b.count(i)
				sum = sum + diff
		return sum
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		N = int(input().strip())
		(S1, S2) = input().strip().split()
		ob = Solution()
		ans = ob.minManipulation(N, S1, S2)
		print(ans)


class Solution:

	def minManipulation(self, N, S1, S2):
		dic = {}
		alpha = 'abcdefghijklmnopqrstuvwxyz'
		for i in alpha:
			dic[i] = 0
		for i in S1:
			dic[i] += 1
		for i in S2:
			dic[i] -= 1
		ans = 0
		for i in alpha:
			ans = ans + abs(dic[i])
		return ans // 2
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		N = int(input().strip())
		(S1, S2) = input().strip().split()
		ob = Solution()
		ans = ob.minManipulation(N, S1, S2)
		print(ans)


from collections import defaultdict

class Solution:

	def minManipulation(self, N, S1, S2):
		data = defaultdict(int)
		for i in S1:
			data[i] += 1
		for i in S2:
			if i in data and data[i] != 0:
				data[i] -= 1
		return sum(data.values())
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		N = int(input().strip())
		(S1, S2) = input().strip().split()
		ob = Solution()
		ans = ob.minManipulation(N, S1, S2)
		print(ans)


class Solution:

	def minManipulation(self, N, s1, s2):
		count = 0
		char_count = [0] * 26
		for i in range(26):
			char_count[i] = 0
		for i in range(len(s1)):
			char_count[ord(s1[i]) - ord('a')] += 1
		for i in range(len(s2)):
			char_count[ord(s2[i]) - ord('a')] -= 1
		for i in range(26):
			if char_count[i] != 0:
				count += abs(char_count[i])
		return count // 2
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		N = int(input().strip())
		(S1, S2) = input().strip().split()
		ob = Solution()
		ans = ob.minManipulation(N, S1, S2)
		print(ans)


class Solution:

	def minManipulation(self, N, S1, S2):
		count1 = []
		count2 = []
		for i in range(26):
			count1.append(0)
			count2.append(0)
		for i in S1:
			count1[ord(i) - 97] += 1
		for i in S2:
			count2[ord(i) - 97] += 1
		ans = 0
		for i in range(26):
			ans += abs(count1[i] - count2[i])
		return int(ans / 2)
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		N = int(input().strip())
		(S1, S2) = input().strip().split()
		ob = Solution()
		ans = ob.minManipulation(N, S1, S2)
		print(ans)


class Solution:

	def minManipulation(self, N, S1, S2):
		arr_1 = [0] * 26
		arr_2 = [0] * 26
		for ele in S1:
			arr_1[ord(ele) - ord('a')] += 1
		for ele in S2:
			arr_2[ord(ele) - ord('a')] += 1
		count_diff = 0
		for (index, ele) in enumerate(arr_1):
			if arr_2[index] - ele > 0:
				count_diff += abs(arr_2[index] - ele)
		return count_diff


class Solution:

	def minManipulation(self, N, S1, S2):
		sm = 0
		c1 = [0] * 26
		c2 = [0] * 26
		for i in S1:
			c1[ord(i) - 97] += 1
		for i in S2:
			c2[ord(i) - 97] += 1
		for j in range(26):
			sm += abs(c1[j] - c2[j])
		return sm // 2


class Solution:

	def minManipulation(self, N, S1, S2):
		return self.hashmapApproach(S1, S2)

	def hashmapApproach(self, s, t):
		AlphabetCount = 26
		charCount = [0] * AlphabetCount
		appendedCharCount = 0
		sLength = len(s)
		tLength = len(t)
		for currIndex in range(0, sLength):
			currAlphabet = s[currIndex]
			charCount[ord(currAlphabet) - ord('a')] += 1
		for currIndex in range(0, tLength):
			currAlphabet = t[currIndex]
			charIndex = ord(currAlphabet) - ord('a')
			if charCount[charIndex] == 0:
				appendedCharCount += 1
			else:
				charCount[charIndex] -= 1
		return appendedCharCount


class Solution:

	def minManipulation(self, N, S1, S2):
		m = {}
		count = 0
		for i in range(len(S1)):
			m[S1[i]] = 1 + m.get(S1[i], 0)
		for j in S2:
			if j in m and m[j] > 0:
				m[j] -= 1
			else:
				count += 1
		return count


class Solution:

	def minManipulation(self, N, S1, S2):
		d1 = dict()
		for i in S1:
			if i in d1:
				d1[i] += 1
			else:
				d1[i] = 1
		d2 = dict()
		for k in S2:
			if k in d2:
				d2[k] += 1
			else:
				d2[k] = 1
		for j in d1:
			if j in d2:
				h = d1[j]
				p = d2[j]
				if p <= h:
					d2[j] = 0
				else:
					d2[j] = abs(h - p)
		d = list(d2.values())
		return sum(d)


from collections import Counter

class Solution:

	def minManipulation(self, N, S1, S2):
		z = Counter(S1)
		c = 0
		for i in range(N):
			if z[S2[i]] == 0:
				c += 1
			else:
				z[S2[i]] -= 1
		return c


class Solution:

	def minManipulation(self, N, S1, S2):
		ch1 = [0] * 26
		ch2 = [0] * 26
		result = 0
		for i in range(len(S1)):
			ch1[ord(S1[i]) - ord('a')] += 1
		for i in range(len(S2)):
			ch2[ord(S2[i]) - ord('a')] += 1
		for i in range(26):
			result += abs(ch1[i] - ch2[i])
		return result // 2


class Solution:

	def minManipulation(self, N, S1, S2):
		cnt = [0] * 26
		for i in range(N):
			t1 = ord(S1[i]) - ord('a')
			t2 = ord(S2[i]) - ord('a')
			cnt[t1] += 1
			cnt[t2] -= 1
		steps = 0
		for i in cnt:
			steps += abs(i)
		return steps // 2


class Solution:

	def minManipulation(self, N, S1, S2):
		ans = 0
		h = [0] * 26
		for i in range(N):
			h[ord(S1[i]) - ord('a')] += 1
			h[ord(S2[i]) - ord('a')] -= 1
		for e in h:
			ans += abs(e)
		return ans // 2


class Solution:

	def minManipulation(self, N, S1, S2):
		hashmap1 = [0] * 26
		for i in range(N):
			hashmap1[ord(S1[i]) - ord('a')] += 1
			hashmap1[ord(S2[i]) - ord('a')] -= 1
		return sum(map(abs, hashmap1)) // 2


from collections import defaultdict

class Solution:
	from collections import defaultdict

	def minManipulation(self, N, S1, S2):
		d = defaultdict(lambda : 0)
		d1 = defaultdict(lambda : 0)
		for i in S1:
			d[i] += 1
		for i in S2:
			d1[i] += 1
		c = 0
		ans = 0
		for i in S2:
			if d[i] >= d1[i]:
				d[i] -= 1
			elif d[i] <= d1[i] and d[i] != 0:
				d[i] -= 1
			else:
				c += 1
		return c


from collections import defaultdict

class Solution:

	def minManipulation(self, N, s1, s2):
		d = defaultdict(int)
		for i in s1:
			d[i] += 1
		for i in s2:
			d[i] -= 1
		diff = 0
		for i in d:
			diff += abs(d[i])
		return diff // 2
		return min(pos, neg)


class Solution:

	def minManipulation(self, N, S1, S2):
		if sorted(S1) == sorted(S2):
			return 0
		else:
			l1 = [0] * 26
			l2 = [0] * 26
			i = 0
			while i < N:
				l1[ord(S1[i]) - ord('a')] += 1
				i += 1
			i = 0
			while i < N:
				l2[ord(S2[i]) - ord('a')] += 1
				i += 1
			res = 0
			for i in range(26):
				res += abs(l1[i] - l2[i])
			return int(res / 2)


class Solution:

	def minManipulation(self, N, S1, S2):
		hmap1 = {}
		hmap2 = {}
		for i in S1:
			if i in hmap1:
				hmap1[i] += 1
			else:
				hmap1[i] = 1
		for i in S2:
			if i in hmap2:
				hmap2[i] += 1
			else:
				hmap2[i] = 1
		ans = 0
		count1 = 0
		count2 = 0
		for (key, val) in hmap1.items():
			if key in hmap2:
				if hmap2[key] == hmap1[key]:
					hmap2[key] = 0
					hmap1[key] = 0
				elif hmap2[key] > hmap1[key]:
					hmap2[key] = hmap2[key] - hmap1[key]
					hmap1[key] = 0
				else:
					hmap1[key] = hmap1[key] - hmap2[key]
					hmap2[key] = 0
		for (key, val) in hmap1.items():
			if val != 0:
				count1 += val
		for (key, val) in hmap2.items():
			if val != 0:
				count2 += val
		ans = max(count1, count2)
		return ans


class Solution:

	def minManipulation(self, N, S1, S2):
		mymap = {}
		ans = 0
		for e in S1:
			if e not in mymap:
				mymap[e] = 1
			else:
				mymap[e] += 1
		for f in S2:
			if f not in mymap.keys():
				continue
			elif mymap[f] == 1:
				del mymap[f]
			else:
				mymap[f] -= 1
		for k in mymap.values():
			ans += k
		return ans


class Solution:

	def minManipulation(self, N, S1, S2):
		h = [0] * 26
		for i in S1:
			value = ord(i) - ord('a')
			h[value] += 1
		count = 0
		for i in S2:
			value = ord(i) - ord('a')
			if h[value] >= 1:
				h[value] -= 1
			else:
				count += 1
		return count


class Solution:

	def minManipulation(self, N, S1, S2):
		mp1 = {}
		mp2 = {}
		for i in range(N):
			if S1[i] not in mp1:
				mp1[S1[i]] = 0
			mp1[S1[i]] += 1
			if S2[i] not in mp2:
				mp2[S2[i]] = 0
			mp2[S2[i]] += 1
		ans = 0
		for i in mp1:
			if i not in mp2:
				ans += mp1[i]
			else:
				ans += max(mp1[i] - mp2[i], 0)
		return ans


class Solution:

	def minManipulation(self, N, S1, S2):
		count = 0
		countChar = [0 for i in range(26)]
		for k in range(N):
			countChar[ord(S1[k]) - ord('a')] += 1
		for j in range(N):
			countChar[ord(S2[j]) - ord('a')] -= 1
		for s in range(26):
			if countChar[s] != 0:
				count += abs(countChar[s])
		return count // 2


import collections

class Solution:

	def minManipulation(self, N, s, t):
		dict_a = collections.Counter(s)
		result = 0
		for element in t:
			if element in dict_a:
				if dict_a[element] == 0:
					result += 1
				else:
					dict_a[element] -= 1
			else:
				result += 1
		return result


class Solution:

	def minManipulation(self, N, S1, S2):
		if len(S1) != len(S2):
			return 0
		d = {'a': -1, 'b': -1, 'c': -1, 'd': -1, 'e': -1, 'f': -1, 'g': -1, 'h': -1, 'i': -1, 'j': -1, 'k': -1, 'l': -1, 'm': -1, 'n': -1, 'o': -1, 'p': -1, 'q': -1, 'r': -1, 's': -1, 't': -1, 'u': -1, 'v': -1, 'w': -1, 'x': -1, 'y': -1, 'z': -1}
		d1 = {'a': -1, 'b': -1, 'c': -1, 'd': -1, 'e': -1, 'f': -1, 'g': -1, 'h': -1, 'i': -1, 'j': -1, 'k': -1, 'l': -1, 'm': -1, 'n': -1, 'o': -1, 'p': -1, 'q': -1, 'r': -1, 's': -1, 't': -1, 'u': -1, 'v': -1, 'w': -1, 'x': -1, 'y': -1, 'z': -1}
		for ch in S1:
			if d1[ch] != -1:
				d1[ch] += 1
			else:
				d1[ch] = 1
		for ch in S2:
			if d[ch] != -1:
				d[ch] += 1
			else:
				d[ch] = 1
		count = 0
		for ch in set(S1):
			if d[ch] != -1 and d1[ch] != -1:
				count += min(d[ch], d1[ch])
		return N - count


class Solution:

	def minManipulation(self, N, s1, s2):
		count = 0
		char_count = [0] * 26
		for i in range(26):
			char_count[i] = 0
		for i in range(len(s1)):
			char_count[ord(s1[i]) - ord('a')] += 1
		for i in range(len(s2)):
			char_count[ord(s2[i]) - ord('a')] -= 1
		for i in range(26):
			if char_count[i] != 0:
				count += abs(char_count[i])
		return count // 2


import collections

class Solution:

	def minManipulation(self, N, s1, s2):
		counts1 = collections.Counter(s1)
		counts2 = collections.Counter(s2)
		(ans1, ans2) = (0, 0)
		for ch in counts1:
			if ch not in counts2:
				ans1 += counts1[ch]
			elif counts1[ch] > counts2[ch]:
				ans1 += counts1[ch] - counts2[ch]
		for ch in counts2:
			if ch not in counts1:
				ans2 += counts2[ch]
			elif counts2[ch] > counts1[ch]:
				ans2 += counts2[ch] - counts1[ch]
		return min(ans1, ans2)
		count = 0
		char_count = [0] * 26
		for i in range(26):
			char_count[i] = 0
		for i in range(len(s1)):
			char_count[ord(s1[i]) - ord('a')] += 1
		for i in range(len(s2)):
			char_count[ord(s2[i]) - ord('a')] -= 1
		for i in range(26):
			if char_count[i] != 0:
				count += abs(char_count[i])
		return count