Given two strings s and t, determine if they are isomorphic.
Two strings s and t are isomorphic if the characters in s can be replaced to get t, with a consistent one-to-one mapping. All occurrences of a character must be replaced with the same character while preserving the order. No two characters may map to the same character, but a character may map to itself.
Example 1:
Input: s = "egg", t = "add"
Output: true
Explanation: The mapping is: 'e' -> 'a', 'g' -> 'd'. Each character in s maps to exactly one character in t and vice versa.
Example 2:
Input: s = "foo", t = "bar"
Output: false
Explanation: 'o' would need to map to both 'a' and 'r', which violates the one-to-one constraint.
Example 3:
Input: s = "paper", t = "title"
Output: true
Explanation: The mapping is: 'p' -> 't', 'a' -> 'i', 'e' -> 'l', 'r' -> 'e'.
1 <= s.length <= 5 * 10⁴t.length == s.lengths and t consist of any valid ASCII character