mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-23 05:48:57 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>一个字符串如果没有 <strong>三个连续</strong> 相同字符,那么它就是一个 <strong>好字符串</strong> 。</p>\n\n<p>给你一个字符串 <code>s</code> ,请你从 <code>s</code> 删除 <strong>最少</strong> 的字符,使它变成一个 <strong>好字符串</strong> 。</p>\n\n<p>请你返回删除后的字符串。题目数据保证答案总是 <strong>唯一的 </strong>。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<b>输入:</b>s = \"le<strong>e</strong>etcode\"\n<b>输出:</b>\"leetcode\"\n<strong>解释:</strong>\n从第一组 'e' 里面删除一个 'e' ,得到 \"leetcode\" 。\n没有连续三个相同字符,所以返回 \"leetcode\" 。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<b>输入:</b>s = \"<strong>a</strong>aab<strong>aa</strong>aa\"\n<b>输出:</b>\"aabaa\"\n<strong>解释:</strong>\n从第一组 'a' 里面删除一个 'a' ,得到 \"aabaaaa\" 。\n从第二组 'a' 里面删除两个 'a' ,得到 \"aabaa\" 。\n没有连续三个相同字符,所以返回 \"aabaa\" 。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<b>输入:</b>s = \"aab\"\n<b>输出:</b>\"aab\"\n<b>解释:</b>没有连续三个相同字符,所以返回 \"aab\" 。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= s.length <= 10<sup>5</sup></code></li>\n\t<li><code>s</code> 只包含小写英文字母。</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 15,
|
||||
"likes": 17,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -137,7 +137,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"6.4K\", \"totalSubmission\": \"10.6K\", \"totalAcceptedRaw\": 6403, \"totalSubmissionRaw\": 10608, \"acRate\": \"60.4%\"}",
|
||||
"stats": "{\"totalAccepted\": \"6.8K\", \"totalSubmission\": \"11.2K\", \"totalAcceptedRaw\": 6790, \"totalSubmissionRaw\": 11190, \"acRate\": \"60.7%\"}",
|
||||
"hints": [
|
||||
"What's the optimal way to delete characters if three or more consecutive characters are equal?",
|
||||
"If three or more consecutive characters are equal, keep two of them and delete the rest."
|
||||
|
Reference in New Issue
Block a user