- Given two strings
sandt, determine ifsis isomorphic tot. - String
sis isomorphic totif the letters inscan be remapped to gett. - Remapping a letter means replacing all occurrences of it in
swith another letter. - A letter in
scould only be mapped to one letter int. - The ordering of the letters must remain unchanged.
- Given "egg", "add", return
true. - Given "foo", "bar", return
false. - Given "paper", "title", return
true.
You may assume both s and t are lower case and have the same length.
This is an O(n) algorithm or better.