Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
handy dictionary 📚 solution in Clear category for Surjection Strings by vincent.tscherter
function isometricStrings(a: string, b: string): boolean {
const dic = {}
return [...a].every( (c, i) =>
dic[c] ? dic[c] == b[i] : (dic[c] = b[i])
);
}
April 30, 2020