Function that converts string X into lexicographically smallest anagram of string Y with minimal changes
function printAnagramAndChanges ( X , Y ) { var countx = new Array ( MAX ) . fill ( 0 ) ; var county = new Array ( MAX ) . fill ( 0 ) ; var ctrx = new Array ( MAX ) . fill ( 0 ) ; var ctry = new Array ( MAX ) . fill ( 0 ) ; var change = 0 ; var l = X . length ;