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>aabcccccaaa</code>会变为<code>a2b1c5a3</code>。若“压缩”后的字符串没有变短则返回原先的字符串。你可以假设字符串中只包含大小写英文字母a至z。</p>\n\n<p> <strong>示例1:</strong></p>\n\n<pre>\n<strong> 输入</strong>\"aabcccccaaa\"\n<strong> 输出</strong>\"a2b1c5a3\"\n</pre>\n\n<p> <strong>示例2:</strong></p>\n\n<pre>\n<strong> 输入</strong>\"abbccd\"\n<strong> 输出</strong>\"abbccd\"\n<strong> 解释</strong>\"abbccd\"压缩后为\"a1b2c2d1\",比原字符串长度更长。\n</pre>\n\n<p><strong>提示:</strong></p>\n\n<ol>\n<li>字符串长度在[0, 50000]范围内。</li>\n</ol>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 125,
"likes": 130,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"86K\", \"totalSubmission\": \"183.7K\", \"totalAcceptedRaw\": 86013, \"totalSubmissionRaw\": 183690, \"acRate\": \"46.8%\"}",
"stats": "{\"totalAccepted\": \"88.1K\", \"totalSubmission\": \"188.2K\", \"totalAcceptedRaw\": 88057, \"totalSubmissionRaw\": 188248, \"acRate\": \"46.8%\"}",
"hints": [
"先做容易的事。压缩字符串,然后再比较长度。",
"注意不要把字符串重复连接在一起。这会非常低效。"