Two strings of the same length are isomorphic if you can replace each letter of s with another letter to get t, so that: the same letter always becomes the same letter, and different letters never become the same letter (no two letters map to one). A letter may map to itself. Strings of different lengths are never isomorphic.
Example 1
Input:
isomorphic_strings('egg', 'add')
Output:
True
e -> a, g -> d.
Example 2
Input:
isomorphic_strings('foo', 'bar')
Output:
False
o would need to become both a and r.
0 <= len(s), len(t) <= 3 * 10**5No results yet
Run your code to check it against the examples, or submit to run every test.