1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-22 21:46:46 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>字符串轮转。给定两个字符串<code>s1</code>和<code>s2</code>,请编写代码检查<code>s2</code>是否为<code>s1</code>旋转而成(比如,<code>waterbottle</code>是<code>erbottlewat</code>旋转后的字符串)。</p>\n\n<p><strong>示例1:</strong></p>\n\n<pre><strong> 输入</strong>s1 = &quot;waterbottle&quot;, s2 = &quot;erbottlewat&quot;\n<strong> 输出</strong>True\n</pre>\n\n<p><strong>示例2:</strong></p>\n\n<pre><strong> 输入</strong>s1 = &quot;aa&quot;, s2 = &quot;aba&quot;\n<strong> 输出</strong>False\n</pre>\n\n<ol>\n</ol>\n\n<p><strong>提示:</strong></p>\n\n<ol>\n\t<li>字符串长度在[0, 100000]范围内。</li>\n</ol>\n\n<p><strong>说明:</strong></p>\n\n<ol>\n\t<li>你能只调用一次检查子串的方法吗?</li>\n</ol>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 107,
"likes": 116,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"41.3K\", \"totalSubmission\": \"75.3K\", \"totalAcceptedRaw\": 41335, \"totalSubmissionRaw\": 75298, \"acRate\": \"54.9%\"}",
"stats": "{\"totalAccepted\": \"42.7K\", \"totalSubmission\": \"77.9K\", \"totalAcceptedRaw\": 42676, \"totalSubmissionRaw\": 77883, \"acRate\": \"54.8%\"}",
"hints": [
"如果一个字符串是另一个字符串的旋转那么它就是在某个特定点上的旋转。例如字符串waterbottle在3处的旋转意味着在第三个字符处切割waterbottle并在左半部分wat之前放置右半部分erbottle。",
"本质上我们是在寻找是否有一种方式可以把第一个字符串分成两部分即x和y如此一来第一个字符串就是xy第二个字符串就是yx。例如x = waty = erbottle。那么第一个字符串xy = waterbottle第二个字符串yx = erbottlewat。",