[Solution] Xor Palindrome CodeChef Solution | CodeChef Problem Solution 2022
You are given a binary string of length .
You can perform the following type of operation on the string :
- Choose two different indices and ;
- Change and to . Here represents the bitwise XOR operation.
Solution Click Below:- CLICK HERE
Find the minimum number of operations required to convert the given string into a palindrome.
Input Format
- First line of the input contains , the number of test cases. Then the test cases follow.
- First line of each test case contains an integer denoting the size of the string.
- Second line of each test case contains a binary string of length containing s and s only.
Output Format
For each test case, print the minimum number of operations required to make the string a palindrome.
Constraints
- Sum of over all test cases does not exceeds .
No comments:
Post a Comment