Company: Ibm_2Nov
Difficulty: medium
Anagram Transformation Problem Description You are given a string s of digits whose length is even. Split it down the middle into a first half and a second half of equal length. In one operation you may replace any single character of the string with any digit from 0 to 9 . Find the smallest number of operations after which the first half is an anagram of the second half -- that is, the two halves contain exactly the same digits with the same multiplicities, in any order. Function Description Complete the getAnagram function. It takes the following parameter: s : STRING, a string of digits of even length. The function must return an INTEGER: the minimum number of operations. Input Format A single line containing the string s . Output Format Print a single integer: the minimum number of operations. Constraints 2 <= length of s <= 100000 The length of s is a multiple of 2. s contains the characters 0 to 9 only. Examples Example 1 Input: 123212 Output: 1 Explanation: The halves are