Company: SHL_17oct
Difficulty: medium
Unchanged Characters in Reversed Stream A company transmits its data to another server. To secure the data against malicious activity, the data stream is reversed before it is sent. The network administrator wants to know how many characters of the stream end up in the same position they started in — that is, how many characters are unchanged by the reversal. Given the data stream, report the number of positions that hold the same character before and after the stream is reversed. Formally, let dataStream have length N . Count the indices i (with 0 <= i < N ) for which dataStream[i] is equal to dataStream[N - 1 - i] . Input Format A single line holding the string dataStream . The line may be absent or empty, which means the data stream is empty. Output Format Print a single integer: the number of characters that do not change position when dataStream is reversed. If no such character exists, or the data stream is empty, print 0 . Constraints 0 <= N <= 100000 , where N is th