368. 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 in t, and a character in s can be replaced with itself.

Input Format

Two strings, s and t.

Output Format

true or false

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