1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-14 03:41:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

add leetcode problem-cn part2

This commit is contained in:
2022-03-27 20:38:29 +08:00
parent 5a4fa6db12
commit 0fc7f4b734
1617 changed files with 134637 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<p>Given two strings, <code>s1</code>&nbsp;and <code>s2</code>, write code to check if <code>s2</code> is a rotation of <code>s1</code> (e.g.,&quot;waterbottle&quot; is a rotation of&quot;erbottlewat&quot;).&nbsp;Can you use&nbsp;only one call to the method that&nbsp;checks if one word is a substring of another?</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input: </strong>s1 = <span id="example-input-1-1">&quot;waterbottle&quot;</span>, s2 = <span id="example-input-1-2">&quot;</span>erbottlewat<span>&quot;</span>
<strong>Output: </strong><span id="example-output-1">True</span>
</pre>
<p><strong>Example 2:</strong></p>
<pre>
<strong>Input: </strong>s1 = &quot;aa&quot;, s2 = &quot;aba&quot;
<strong>Output: </strong>False
</pre>
<p>&nbsp;</p>
<p><strong>Note:</strong></p>
<ol>
<li><code><font face="monospace">0 &lt;= s1.length, s2.length &lt;=&nbsp;</font>100000</code></li>
</ol>