Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Surjection Strings by twilyght
from collections import defaultdict
def isometric_strings(str1: str, str2: str) -> bool:
matches = defaultdict(set)
for i, c in enumerate(str1):
matches[c].add(str2[i])
return all(len(v) == 1 for v in matches.values())
May 7, 2020