1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 19:18:14 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/算法题(国内版)/problem (Chinese)/判定是否互为字符重排 [check-permutation-lcci].html

21 lines
676 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>给定两个字符串 <code>s1</code><code>s2</code>,请编写一个程序,确定其中一个字符串的字符重新排列后,能否变成另一个字符串。</p>
<p><strong>示例 1</strong></p>
<pre><strong>输入:</strong> <code>s1</code> = &quot;abc&quot;, <code>s2</code> = &quot;bca&quot;
<strong>输出:</strong> true
</pre>
<p><strong>示例 2</strong></p>
<pre><strong>输入:</strong> <code>s1</code> = &quot;abc&quot;, <code>s2</code> = &quot;bad&quot;
<strong>输出:</strong> false
</pre>
<p><strong>说明:</strong></p>
<ul>
<li><code>0 &lt;= len(s1) &lt;= 100 </code></li>
<li><code>0 &lt;= len(s2) &lt;= 100 </code></li>
</ul>