Isomorphic Strings — JavaScript easy interview problem
Two strings `s` and `t` are isomorphic if the characters in `s` can be replaced to get `t`. All occurrences of a character must be replaced with another character while preserving order. No two characters may map to the same character, but a character may map to itself. Example: `isIsomorphic("egg", "add")` → `true`; `isIsomorphic("foo", "bar")` → `false`.
Tags: hashmap, bijection
Practice this HashMap & Set problem free in the JS Interview Playground with automated tests and unlockable solutions.