Easy
Isomorphic Strings
Easy
232 submissions
10 coins
+50 XP
Hash Table
String
Problem Description
Two equal-length strings are isomorphic if the characters of `s` can be replaced to get `t`, where every occurrence of a character maps to the same character and no two characters map to the same one. Return whether `s` and `t` are isomorphic.
**Example 1:**
```
Input: s = "egg", t = "add"
Output: true
```
**Example 2:**
```
Input: s = "foo", t = "bar"
Output: false
```
**Example 3:**
```
Input: s = "paper", t = "title"
Output: true
```
Constraints
- `1 <= s.length == t.length <= 5 * 10^4`
Need help?
Connect with expert programmers for real-time collaborative coding, video meetings, and whiteboard sessions via CodeConnect.
Video Call
Whiteboard
Live Coding
Screen Share