mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-25 23:08:57 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个字符串 <code>s</code> ,请你返回满足以下条件且出现次数最大的 <strong>任意</strong> 子串的出现次数:</p>\n\n<ul>\n\t<li>子串中不同字母的数目必须小于等于 <code>maxLetters</code> 。</li>\n\t<li>子串的长度必须大于等于 <code>minSize</code> 且小于等于 <code>maxSize</code> 。</li>\n</ul>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>s = "aababcaab", maxLetters = 2, minSize = 3, maxSize = 4\n<strong>输出:</strong>2\n<strong>解释:</strong>子串 "aab" 在原字符串中出现了 2 次。\n它满足所有的要求:2 个不同的字母,长度为 3 (在 minSize 和 maxSize 范围内)。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>s = "aaaa", maxLetters = 1, minSize = 3, maxSize = 3\n<strong>输出:</strong>2\n<strong>解释:</strong>子串 "aaa" 在原字符串中出现了 2 次,且它们有重叠部分。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入:</strong>s = "aabcabcab", maxLetters = 2, minSize = 2, maxSize = 3\n<strong>输出:</strong>3\n</pre>\n\n<p><strong>示例 4:</strong></p>\n\n<pre><strong>输入:</strong>s = "abcde", maxLetters = 2, minSize = 3, maxSize = 3\n<strong>输出:</strong>0\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= s.length <= 10^5</code></li>\n\t<li><code>1 <= maxLetters <= 26</code></li>\n\t<li><code>1 <= minSize <= maxSize <= min(26, s.length)</code></li>\n\t<li><code>s</code> 只包含小写英文字母。</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 64,
|
||||
"likes": 65,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"7.5K\", \"totalSubmission\": \"16.2K\", \"totalAcceptedRaw\": 7529, \"totalSubmissionRaw\": 16159, \"acRate\": \"46.6%\"}",
|
||||
"stats": "{\"totalAccepted\": \"7.8K\", \"totalSubmission\": \"16.7K\", \"totalAcceptedRaw\": 7750, \"totalSubmissionRaw\": 16676, \"acRate\": \"46.5%\"}",
|
||||
"hints": [
|
||||
"Check out the constraints, (maxSize <=26).",
|
||||
"This means you can explore all substrings in O(n * 26).",
|
||||
|
||||
Reference in New Issue
Block a user