mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-12 02:41:42 +08:00
批量更新数据
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
<p>字符串压缩。利用字符重复出现的次数,编写一种方法,实现基本的字符串压缩功能。比如,字符串<code>aabcccccaaa</code>会变为<code>a2b1c5a3</code>。若“压缩”后的字符串没有变短,则返回原先的字符串。你可以假设字符串中只包含大小写英文字母(a至z)。</p>
|
||||
|
||||
<p> <strong>示例1:</strong></p>
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong> 输入</strong>:"aabcccccaaa"
|
||||
<strong> 输出</strong>:"a2b1c5a3"
|
||||
<strong>输入</strong>:"aabcccccaaa"
|
||||
<strong>输出</strong>:"a2b1c5a3"
|
||||
</pre>
|
||||
|
||||
<p> <strong>示例2:</strong></p>
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong> 输入</strong>:"abbccd"
|
||||
<strong> 输出</strong>:"abbccd"
|
||||
<strong> 解释</strong>:"abbccd"压缩后为"a1b2c2d1",比原字符串长度更长。
|
||||
<strong>输入</strong>:"abbccd"
|
||||
<strong>输出</strong>:"abbccd"
|
||||
<strong>解释</strong>:"abbccd"压缩后为"a1b2c2d1",比原字符串长度更长。
|
||||
</pre>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ol>
|
||||
<li>字符串长度在[0, 50000]范围内。</li>
|
||||
<li>字符串长度在 <code>[0, 50000]</code> 范围内。</li>
|
||||
</ol>
|
||||
|
Reference in New Issue
Block a user