825. String Partition
0
Medium
Given a string s, the task is to partition it into multiple parts such that each letter appears in at most one part. The partitions should be concatenated in order to form the original string s. Output the number of characters in each partition, separated by space.
Input Format
A string s.
Output Format
Space-separated integers representing the sizes of each partition.
Example
Input
ababcbacadefegdehijhklij
Output
9 7 8
Constraints
1 <= s.length() <= 500
s consists of lowercase English letters.
s consists of lowercase English letters.
Loading...
View Submissions
Console