Given a binary string s and two integers x and y. Arrange the given string in such a way so that '0' comes X-times then '1' comes Y-times and so on until one of the '0' or '1' is finished. Then concatenate rest of the string and print the final string.
The first line consists of an integer T i.e number of test cases. The first line of each test case consists of two integers x and y.Then next line consists of a string s.
Print the required answer.
1<=|Length of string|<=10000
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.