Two strings s1 and s2 of equal length n are given. You can swap s1[i] and s2[j] if i is equal to j. The objective is to obtain minimum number of unique characters in the strings. You need to print max(unique_chars_in_s1,unique_chars_in_s2) and this should be as minimum as possible. you can perform any number of swaps and the string consists of lower-case alphabets only.
How can this be done efficiently.