1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-22 05:26: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>给你一个字符串&nbsp;<code>text</code> ,请你返回满足下述条件的&nbsp;<strong>不同</strong> 非空子字符串的数目:</p>\n\n<ul>\n\t<li>可以写成某个字符串与其自身相连接的形式(即,可以写为 <code>a&nbsp;+ a</code>,其中 <code>a</code> 是某个字符串)。</li>\n</ul>\n\n<p>例如,<code>abcabc</code>&nbsp;就是&nbsp;<code>abc</code>&nbsp;和它自身连接形成的。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre><strong>输入:</strong>text = &quot;abcabcabc&quot;\n<strong>输出:</strong>3\n<strong>解释:</strong>3 个子字符串分别为 &quot;abcabc&quot;&quot;bcabca&quot; 和 &quot;cabcab&quot; 。\n</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre><strong>输入:</strong>text = &quot;leetcodeleetcode&quot;\n<strong>输出:</strong>2\n<strong>解释:</strong>2 个子字符串为 &quot;ee&quot; 和 &quot;leetcodeleetcode&quot; 。\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= text.length &lt;= 2000</code></li>\n\t<li><code>text</code>&nbsp;只包含小写英文字母。</li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 38,
"likes": 37,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -167,7 +167,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"3.3K\", \"totalSubmission\": \"7.2K\", \"totalAcceptedRaw\": 3253, \"totalSubmissionRaw\": 7231, \"acRate\": \"45.0%\"}",
"stats": "{\"totalAccepted\": \"3.4K\", \"totalSubmission\": \"7.5K\", \"totalAcceptedRaw\": 3388, \"totalSubmissionRaw\": 7471, \"acRate\": \"45.3%\"}",
"hints": [
"Given a substring of the text, how to check if it can be written as the concatenation of a string with itself ?",
"We can do that in linear time, a faster way is to use hashing.",