1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-19 20:16:48 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 12:43:11 +08:00
parent 58bbdfd57c
commit 2b0511d272
10721 changed files with 8123 additions and 8119 deletions

View File

@@ -0,0 +1,23 @@
<p>字符串 <code>S</code> 由小写字母组成。我们要把这个字符串划分为尽可能多的片段,同一字母最多出现在一个片段中。返回一个表示每个字符串片段的长度的列表。</p>
<p> </p>
<p><strong>示例:</strong></p>
<pre>
<strong>输入:</strong>S = "ababcbacadefegdehijhklij"
<strong>输出:</strong>[9,7,8]
<strong>解释:</strong>
划分结果为 "ababcbaca", "defegde", "hijhklij"。
每个字母最多出现在一个片段中。
像 "ababcbacadefegde", "hijhklij" 的划分是错误的,因为划分的片段数较少。
</pre>
<p> </p>
<p><strong>提示:</strong></p>
<ul>
<li><code>S</code>的长度在<code>[1, 500]</code>之间。</li>
<li><code>S</code>只包含小写字母 <code>'a'</code><code>'z'</code></li>
</ul>