#C11909. Minimum Operations to Transform a String into a Palindrome
Minimum Operations to Transform a String into a Palindrome
Minimum Operations to Transform a String into a Palindrome
Given a string \(S\), determine the minimum number of operations required to transform it into a palindrome. In one operation, you can change a character so that it matches its corresponding mirrored character. More formally, for a string \(S\) with length \(N\), you need to count the number of indices \(i\) (where \(0 \le i < N/2\)) such that \(S[i] \neq S[N-i-1]\).
For example, if \(S = \texttt{abca}\), there is one mismatching pair (\(b\) and \(c\)), which means that only one operation is necessary.
inputFormat
The input begins with an integer \(T\), the number of test cases. Each of the following \(T\) lines contains a non-empty string \(S\).
outputFormat
For each test case, output a single line containing an integer representing the minimum number of operations needed to transform \(S\) into a palindrome.
## sample2
ab
aab
1
1
</p>