mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 19:31:42 +08:00
add leetcode problem-cn part6
This commit is contained in:
32
算法题(国内版)/problem (Chinese)/找不同 [find-the-difference].html
Normal file
32
算法题(国内版)/problem (Chinese)/找不同 [find-the-difference].html
Normal file
@@ -0,0 +1,32 @@
|
||||
<p>给定两个字符串 <code>s</code> 和 <code>t</code> ,它们只包含小写字母。</p>
|
||||
|
||||
<p>字符串 <code>t</code> 由字符串 <code>s</code> 随机重排,然后在随机位置添加一个字母。</p>
|
||||
|
||||
<p>请找出在 <code>t</code> 中被添加的字母。</p>
|
||||
|
||||
<p> </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> </p>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>0 <= s.length <= 1000</code></li>
|
||||
<li><code>t.length == s.length + 1</code></li>
|
||||
<li><code>s</code> 和 <code>t</code> 只包含小写字母</li>
|
||||
</ul>
|
Reference in New Issue
Block a user