1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-03 06:22:54 +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>s</code> 看作是&nbsp;<code>“abcdefghijklmnopqrstuvwxyz”</code>&nbsp;的无限环绕字符串,所以&nbsp;<code>s</code> 看起来是这样的:</p>\n\n<ul>\n\t<li><code>\"...zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd....\"</code>&nbsp;.&nbsp;</li>\n</ul>\n\n<p>现在给定另一个字符串 <code>p</code> 。返回<em>&nbsp;<code>s</code> 中&nbsp;<strong>唯一</strong> 的 <code>p</code> 的 <strong>非空子串</strong>&nbsp;的数量&nbsp;</em>。&nbsp;</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例&nbsp;1:</strong></p>\n\n<pre>\n<strong>输入:</strong> p = \"a\"\n<strong>输出:</strong> 1\n<strong>解释:</strong> 字符串 s 中只有一个\"a\"子字符。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong> p = \"cac\"\n<strong>输出:</strong> 2\n<strong>解释:</strong> 字符串 s 中的字符串“cac”只有两个子串“a”、“c”。.\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong> p = \"zab\"\n<strong>输出:</strong> 6\n<strong>解释:</strong> 在字符串 s 中有六个子串“z”、“a”、“b”、“za”、“ab”、“zab”。\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= p.length &lt;= 10<sup>5</sup></code></li>\n\t<li><code>p</code>&nbsp;由小写英文字母构成</li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 191,
"likes": 192,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"10.6K\", \"totalSubmission\": \"23.6K\", \"totalAcceptedRaw\": 10576, \"totalSubmissionRaw\": 23613, \"acRate\": \"44.8%\"}",
"stats": "{\"totalAccepted\": \"10.9K\", \"totalSubmission\": \"24.3K\", \"totalAcceptedRaw\": 10888, \"totalSubmissionRaw\": 24348, \"acRate\": \"44.7%\"}",
"hints": [
"One possible solution might be to consider allocating an array size of 26 for each character in the alphabet. (Credits to @r2ysxu)"
],