Want to solve this problem? Login now to get access to solve the problems
You don’t have to print anything, it has already been taken care of. Just implement the function. The string will contain lowercase alphabets only.
The first line of input contains an integer ‘T’ denoting the number of test cases.
The first and only line of each test case contains string S..
For each test case, the list containing the size of partitions will be printed.
The output of each test case is printed in a separate line.
1 <= T <= 10
1 <= N <= 5 * 10^4
Where ‘T’ is the total number of test cases and N represents the length of the string S.
1
aaababcc
6 2
The partitions are ‘aaabab’ , ‘cc’. The partitions are such that ‘a’ and ‘b’ appear only in the first part and ‘c’ appears only in the second part.
2
ababcbacadefegdehijhklij
bbbbbb
9 7 8
6
Test Case 1:
The partitions are ‘ababcbaca’ , ‘defegde’ , ‘hijhklij’.
Test Case 2:
The partition is ‘bbbbbb’.