mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 19:31:42 +08:00
add leetcode problem-cn part2
This commit is contained in:
28
算法题(国内版)/problem (Chinese)/字符串轮转 [string-rotation-lcci].html
Normal file
28
算法题(国内版)/problem (Chinese)/字符串轮转 [string-rotation-lcci].html
Normal file
@@ -0,0 +1,28 @@
|
||||
<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 = "waterbottle", s2 = "erbottlewat"
|
||||
<strong> 输出</strong>:True
|
||||
</pre>
|
||||
|
||||
<p><strong>示例2:</strong></p>
|
||||
|
||||
<pre><strong> 输入</strong>:s1 = "aa", s2 = "aba"
|
||||
<strong> 输出</strong>:False
|
||||
</pre>
|
||||
|
||||
<ol>
|
||||
</ol>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ol>
|
||||
<li>字符串长度在[0, 100000]范围内。</li>
|
||||
</ol>
|
||||
|
||||
<p><strong>说明:</strong></p>
|
||||
|
||||
<ol>
|
||||
<li>你能只调用一次检查子串的方法吗?</li>
|
||||
</ol>
|
Reference in New Issue
Block a user