1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58: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 Normal View History

2023-12-09 18:42:21 +08:00
<p>给定两个由小写字母组成的字符串 <code>s1</code><code>s2</code>,请编写一个程序,确定其中一个字符串的字符重新排列后,能否变成另一个字符串。</p>
2022-03-27 20:38:29 +08:00
<p><strong>示例 1</strong></p>
2023-12-09 18:42:21 +08:00
<pre>
<strong>输入:</strong> <code>s1</code> = "abc", <code>s2</code> = "bca"
2022-03-27 20:38:29 +08:00
<strong>输出:</strong> true
</pre>
<p><strong>示例 2</strong></p>
2023-12-09 18:42:21 +08:00
<pre>
<strong>输入:</strong> <code>s1</code> = "abc", <code>s2</code> = "bad"
2022-03-27 20:38:29 +08:00
<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>