Skip to content

Commit f23a787

Browse files
committed
Create README - LeetHub
1 parent 7c41b2d commit f23a787

File tree

1 file changed

+37
-0
lines changed
  • 1347-minimum-number-of-steps-to-make-two-strings-anagram

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<h2><a href="https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram/">1347. Minimum Number of Steps to Make Two Strings Anagram</a></h2><h3>Medium</h3><hr><div><p>You are given two strings of the same length <code>s</code> and <code>t</code>. In one step you can choose <strong>any character</strong> of <code>t</code> and replace it with <strong>another character</strong>.</p>
2+
3+
<p>Return <em>the minimum number of steps</em> to make <code>t</code> an anagram of <code>s</code>.</p>
4+
5+
<p>An <strong>Anagram</strong> of a string is a string that contains the same characters with a different (or the same) ordering.</p>
6+
7+
<p>&nbsp;</p>
8+
<p><strong class="example">Example 1:</strong></p>
9+
10+
<pre><strong>Input:</strong> s = "bab", t = "aba"
11+
<strong>Output:</strong> 1
12+
<strong>Explanation:</strong> Replace the first 'a' in t with b, t = "bba" which is anagram of s.
13+
</pre>
14+
15+
<p><strong class="example">Example 2:</strong></p>
16+
17+
<pre><strong>Input:</strong> s = "leetcode", t = "practice"
18+
<strong>Output:</strong> 5
19+
<strong>Explanation:</strong> Replace 'p', 'r', 'a', 'i' and 'c' from t with proper characters to make t anagram of s.
20+
</pre>
21+
22+
<p><strong class="example">Example 3:</strong></p>
23+
24+
<pre><strong>Input:</strong> s = "anagram", t = "mangaar"
25+
<strong>Output:</strong> 0
26+
<strong>Explanation:</strong> "anagram" and "mangaar" are anagrams.
27+
</pre>
28+
29+
<p>&nbsp;</p>
30+
<p><strong>Constraints:</strong></p>
31+
32+
<ul>
33+
<li><code>1 &lt;= s.length &lt;= 5 * 10<sup>4</sup></code></li>
34+
<li><code>s.length == t.length</code></li>
35+
<li><code>s</code> and <code>t</code> consist of lowercase English letters only.</li>
36+
</ul>
37+
</div>

0 commit comments

Comments
 (0)