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)/字符串轮转 [string-rotation-lcci].html
2022-03-29 12:43:11 +08:00

29 lines
774 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>,请编写代码检查<code>s2</code>是否为<code>s1</code>旋转而成(比如,<code>waterbottle</code><code>erbottlewat</code>旋转后的字符串)。</p>
<p><strong>示例1:</strong></p>
<pre><strong> 输入</strong>s1 = &quot;waterbottle&quot;, s2 = &quot;erbottlewat&quot;
<strong> 输出</strong>True
</pre>
<p><strong>示例2:</strong></p>
<pre><strong> 输入</strong>s1 = &quot;aa&quot;, s2 = &quot;aba&quot;
<strong> 输出</strong>False
</pre>
<ol>
</ol>
<p><strong>提示:</strong></p>
<ol>
<li>字符串长度在[0, 100000]范围内。</li>
</ol>
<p><strong>说明:</strong></p>
<ol>
<li>你能只调用一次检查子串的方法吗?</li>
</ol>