
'N' = 5, 'S' = "abacd".
The number of unique characters in 'S' is 4.
The parity of 4 and parity of 'N'( which is 5) is not the same. So, the string 'S' is not a good string. We will print 0.
The first line contains an integer 'T', which denotes the number of test cases to be run. Then the test cases follow.
The first line of each test case contains an integer 'N', denoting the size of the string 'S'.
The next line contains a string of size 'N'.
For each test case, print 1 if the parity of the number of unique characters is same as the parity of size of the string.
Print the output of each test case in a new line.
You don’t need to print anything. It has already been taken care of. Just implement the given function.
1 <= T <= 10
1 <= N <= 10^5
The string 'S' consists of lowercase letters only.
The Sum of 'N' over all test cases is <= 10 ^ 5.
Time Limit: 1 sec
Approach :
Algorithm: