Given two strings s and t of the same length, determine if they are isomorphic.
Two strings are isomorphic if the characters in s can be replaced to get t, with a consistent one-to-one mapping. Every occurrence of a character in s must map to the same character in t, and no two different characters in s may map to the same character in t. A character may map to itself.
Return true if the strings are isomorphic, false otherwise.
s = "egg", t = "add"trues = "foo", t = "bar"falses = "paper", t = "title"trues = "badc", t = "baba"false1 <= s.length <= 5 * 10^4s.length == t.lengths and t consist of any valid ASCII characters.Run your code to see results
Use Cmd+Enter to run