A string of length
K is called a nice if the frequency of one of its characters is greater than or equal to
floor(K/2). You are given a string
s of length
N, find the length of longest nice substring.
Tnumber of test cases.
For each test case first line contains
N, i.e., length of string
sand next line contains the string
sitself containing only lower case English letters.
- For each test case output the length of longest nice substring.