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)/找不同 [find-the-difference].html
2022-03-29 12:43:11 +08:00

33 lines
849 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>s</code><code>t</code>&nbsp;,它们只包含小写字母。</p>
<p>字符串 <code>t</code>&nbsp;由字符串 <code>s</code> 随机重排,然后在随机位置添加一个字母。</p>
<p>请找出在 <code>t</code>&nbsp;中被添加的字母。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>s = "abcd", t = "abcde"
<strong>输出:</strong>"e"
<strong>解释:</strong>'e' 是那个被添加的字母。
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>s = "", t = "y"
<strong>输出:</strong>"y"
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>0 &lt;= s.length &lt;= 1000</code></li>
<li><code>t.length == s.length + 1</code></li>
<li><code>s</code><code>t</code> 只包含小写字母</li>
</ul>