test-152

Pati's girlfriend dumped him because he couldn't even solve a simple string puzzle.

Puzzle is,  given a string of lowercase alphabets and you are supposed to check whether the frequency of the most frequent character is even or not.

Even after being dumped because of this puzzle, Pati is quite confident that it is impossible to check whether the frequency of the most frequent character is even or not. 

Now he dares you to prove him wrong. 

Input
First line of input contains an integer T - the number of test cases.

First line of each test case contains an integer n - the length of the String

Second line of each test case contains a string of length n

Output
Print T lines as described below.

For each test case print "Yes" if frequency of the most frequent character is even otherwise print "No".

Constraints
1 ≤ T ≤ 1000

1 ≤ n ≤ 100,000

SAMPLE INPUT
2
5
aabcd
6
xyzzdz

SAMPLE OUTPUT
Yes
No

Source: hackerearth | Difficulty: EASY
Tags: String algorithms


Solutions:
t = int(input())
for _ in range(0,t):
	maxi = 0
	n = int(input())
	sentence = input()
	for x in range(97,123):
		 no = sentence.count(str(chr(x)))
		 if no > maxi:
		 	maxi = no
	# print maxi
	if (maxi % 2) ==0:
		print("Yes")
	else:
		print("No")




for _ in range(eval(input())):
	li = [0] * 26
	y = eval(input())
	x = input()
	for i in x:
		li[ord(i) - 97] = li[ord(i) - 97] + 1
	if max(li) % 2 == 0:
		print("Yes")
	else:
		print("No")


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	dict = {}
	for i in s:
		if i not in dict:
			dict.update({i:int(1)})
		else:
			dict[i]+=1;
	m = 0;
	for key in dict:
		if dict[key]>m:
			m = dict[key];
	if m%2 ==0:
		print("Yes")
	else:
		print("No")
			
	
		



t=int(input())
for x in range(t):
	n=int(input())
	s=input()
	ar=[]
	for y in s:
		ar.append(y)
	l=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',]
	c=[]
	for z in ar:
		if z in l:
		    l.remove(z)
		    c.append(ar.count(z))
	if max(c)%2==0:
		print("Yes")
	else:
		print("No")