Class Solution
java.lang.Object
g0201_0300.s0205_isomorphic_strings.Solution
205 - Isomorphic Strings.<p>Easy</p>
<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><strong>Example 1:</strong></p>
<p><strong>Input:</strong> s = “egg”, t = “add”</p>
<p><strong>Output:</strong> true</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> s = “foo”, t = “bar”</p>
<p><strong>Output:</strong> false</p>
<p><strong>Example 3:</strong></p>
<p><strong>Input:</strong> s = “paper”, t = “title”</p>
<p><strong>Output:</strong> true</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>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
isIsomorphic
-