}//mapTo[i]: mapping from position i in s to s[i]'s correct position in t.int[] mapTo =newint[n];for(inti = 0; i < n; i++) {intd = s.charAt(i) - '0';//if the current digit can not be mapped to t, s and t are not anagramsif(idx[d].size() == 0) {return...