mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 16:31:42 +08:00
存量题库数据更新
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<p>Return the minimum number of swaps required to make <code>s1</code> and <code>s2</code> equal, or return <code>-1</code> if it is impossible to do so.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> s1 = "xx", s2 = "yy"
|
||||
@@ -11,7 +11,7 @@
|
||||
<strong>Explanation:</strong> Swap s1[0] and s2[1], s1 = "yx", s2 = "yx".
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> s1 = "xy", s2 = "yx"
|
||||
@@ -21,7 +21,7 @@ Swap s1[0] and s2[1], s1 = "xy", s2 = "xy".
|
||||
Note that you cannot swap s1[0] and s1[1] to make s1 equal to "yx", cause we can only swap chars in different strings.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 3:</strong></p>
|
||||
<p><strong class="example">Example 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> s1 = "xx", s2 = "xy"
|
||||
@@ -33,5 +33,6 @@ Note that you cannot swap s1[0] and s1[1] to make s1 equal to "yx", ca
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= s1.length, s2.length <= 1000</code></li>
|
||||
<li><code>s1.length == s2.length</code></li>
|
||||
<li><code>s1, s2</code> only contain <code>'x'</code> or <code>'y'</code>.</li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user