1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/判定是否互为字符重排 [check-permutation-lcci].html

23 lines
662 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> = "abc", <code>s2</code> = "bca"
<strong>输出:</strong> true
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong> <code>s1</code> = "abc", <code>s2</code> = "bad"
<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>