Function that converts string X into lexicographically smallest anagram of string Y with minimal changes
static void printAnagramAndChanges ( char [ ] X , char [ ] Y ) { int [ ] countx = new int [ MAX ] ; int [ ] county = new int [ MAX ] ; int [ ] ctrx = new int [ MAX ] ; int [ ] ctry = new int [ MAX ] ; int change = 0 ; int l = X . Length ;