Company: Wipro_16may
Difficulty: medium
Minimize Integer Difference with Minimum Swaps You are given two strings of digits S and T , both of length N , which represent two (possibly very large) non-negative integers. You want the two numbers to be as close together as possible, that is, you want to minimise the absolute value of their difference. The only move you are allowed is a positional swap : for any position i you may exchange the i -th digit of S with the i -th digit of T . Every position may be swapped independently, and swapping the same position twice just undoes the move, so each position is either swapped or it is not. Swaps are expensive. Among all the ways to reach the smallest possible absolute difference, report the one that uses the fewest swaps , and print that number of swaps. Input Format The first line contains the string S . The second line contains the string T . Both lines have the same length N and consist of decimal digits only. Output Format Print a single integer — the minimum number of positiona