mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 07:51:41 +08:00
update
This commit is contained in:
25
leetcode/problem/isomorphic-strings.html
Normal file
25
leetcode/problem/isomorphic-strings.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<p>Given two strings <code>s</code> and <code>t</code>, <em>determine if they are isomorphic</em>.</p>
|
||||
|
||||
<p>Two strings <code>s</code> and <code>t</code> are isomorphic if the characters in <code>s</code> can be replaced to get <code>t</code>.</p>
|
||||
|
||||
<p>All occurrences of a character must be replaced with another character while preserving the order of characters. No two characters may map to the same character, but a character may map to itself.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<pre><strong>Input:</strong> s = "egg", t = "add"
|
||||
<strong>Output:</strong> true
|
||||
</pre><p><strong>Example 2:</strong></p>
|
||||
<pre><strong>Input:</strong> s = "foo", t = "bar"
|
||||
<strong>Output:</strong> false
|
||||
</pre><p><strong>Example 3:</strong></p>
|
||||
<pre><strong>Input:</strong> s = "paper", t = "title"
|
||||
<strong>Output:</strong> true
|
||||
</pre>
|
||||
<p> </p>
|
||||
<p><strong>Constraints:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= s.length <= 5 * 10<sup>4</sup></code></li>
|
||||
<li><code>t.length == s.length</code></li>
|
||||
<li><code>s</code> and <code>t</code> consist of any valid ascii character.</li>
|
||||
</ul>
|
Reference in New Issue
Block a user