#205

Isomorphic Strings

pupil · 470 · lc easy +26 · 48.1% accepted · 10,489 likes · top 34%

play →

Description

Given two strings s and t, determine if they are isomorphic.

Two strings are isomorphic if every character in s can be consistently mapped to a unique character in t to produce t. All occurrences of a character must map to the same replacement, and no two distinct characters in s may map to the same character in t, though a character may map to itself.

Code

1
2
3