Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
dict solution in Clear category for Surjection Strings by David_Jones
def isometric_strings(str1, str2):
mapped = {}
for ch1, ch2 in zip(str1, str2):
if ch1 in mapped and mapped[ch1] != ch2:
return False
mapped[ch1] = ch2
return True
May 30, 2019