761. Isomorphic Strings

0

Easy

Determine if two given strings, s and t, are isomorphic.
Two strings are considered isomorphic if the characters in s can be replaced with characters in t, while maintaining the order of characters. Each character in s must be replaced with a unique character from t, and no two characters in s can be replaced with the same character in t. However, a character in s can be replaced with itself.

Input Format

Two input strings, s and t.

Output Format

Return true if the strings are isomorphic, and false otherwise.

Example

Input

egg
add

Output

true

Constraints

1 <= s.length <= 5 * 10^4

t.length == s.length

s and t consist of any valid ascii character.

t.length == s.length

s and t consist of any valid ascii character.

Loading...

View Submissions

Console